%init> #!/usr/bin/perl use CGI qw(:all); use strict; use warnings; no warnings 'closure'; use Data::Dumper; my @mods; #------------------------------------------------------------------------------- sub list_modules { my ($n, $msg, $i); eval "use File::Find;"; if ($@) { disp_html(qq|Sorry, File::Find is not installed on this server.|); } find(\&wanted, @INC); @mods = sort {lc($a) cmp lc($b)} @mods; my $prev = 'none'; @mods = grep($_ ne $prev && (($prev) = $_), @mods); $n = @mods; $msg = qq|
Found: $n Modules
\n|; $msg .= qq|| \n|;
$i = 0;
foreach (@mods) {
$i++;
$msg .= qq| $_ \n|; if (($i == int(($n / 3) + 2 / 3)) or ($i == int((2 * $n / 3) + 2 / 3 ))) { $msg .= qq| | \n\n|; } } $msg .= " | \n
|
LIST PERL MODULES INSTALLED ON THIS SERVER |
|
|