use strict;
use CGI qw/:standard/;
my $ext = 'pl';
my $Indent = 15;
my $q = new CGI;
print $q->header;
print $q->start_html;
&GetDirs;
print $q->end_html;
sub
GetDirs
{
my ($Dir, $Posn) = @_;
chdir $Dir if $Dir;
while (<*/>) {
print "
$_
";
&GetDirs($_, $Posn + $Indent);
}
while (<*.$ext>) {
print "$_";
}
chdir "../" if $Dir;
}
##
##
sub
GetDirs
{
my ($Dir, $Posn) = @_;
my $OldDir = getcwd;
chdir $Dir;
while (<*/>) {
print "$_
";
&GetDirs(getcwd, $Posn + $Indent);
}
while (<*.$ext>) {
print "