CHRYSt has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use File::Recurse; print "Content-Type: text/html\n\n"; print "<html><body><h1>Web Server Directory Listing</h1>"; my %files = &Recurse(['/Intranet/html'], {}); my @dirs = (); my @files = (); foreach (sort keys %files) { @dirs = split(/\/Intranet\/html/,$_); print "<A href='@dirs'>@dirs</a><br>"; foreach (@{ $files{$_} }) { @files = (@files,$_); } } $f = @files; $d = @dirs; print "<br><br>"; print "$d total directories were found."; print "$f total files were found."; print "</body></html>";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: recurse directory script
by tamills (Acolyte) on Jan 09, 2002 at 19:31 UTC | |
|
Re: recurse directory script
by mkmcconn (Chaplain) on Jan 09, 2002 at 05:45 UTC | |
|
Re: recurse directory script
by dmmiller2k (Chaplain) on Jan 09, 2002 at 20:02 UTC | |
by FoxtrotUniform (Prior) on Jan 10, 2002 at 04:24 UTC | |
by tilly (Archbishop) on Jan 10, 2002 at 07:24 UTC | |
|
Re: recurse directory script
by LordAvatar (Acolyte) on Jan 09, 2002 at 19:35 UTC | |
|
THANKS!! Re: recurse directory script
by CHRYSt (Acolyte) on Jan 09, 2002 at 23:12 UTC | |
|
Re: recurse directory script
by Anonymous Monk on Jan 10, 2002 at 00:17 UTC |