#!/usr/bin/perl # Configuration Variables # Change these variables to match your web server's configuration use File::Find; use strict; my $base_url = "http://www.brie.com"; my $base_dir = "/home/www/htdocs"; my $i = 1; if (! -f "$base_dir/site.html") { open (OUTFILE , ">$base_dir/site.html"); } else { die "$base_dir/site.html already exists.\n Remove or move it before running this\n"; } print OUTFILE << "__END__"; Site Mapa

$base_url Site Map

__END__

finddepth(\&wanted, $base_dir);

print OUTFILE << "__END__";

Originally developed by:

Brian Lavender
__END__ sub wanted { if (/\.html$/) { my $temp = $File::Find::name; $temp =~ s/\Q$base_dir//; printf OUTFILE ("%5d",$i); print OUTFILE qq{ },$temp,"\n"; if ($i % 5 == 0) { print OUTFILE "\n"}; $i++; } }