alarm 30; $|=1; ## Choose operating system BEGIN { if (($^O eq 'MSWin32') || defined($ENV{'OS'})) { $operatingsystem = 0; $operatingsystemoldnt = 0; $systempath = "$ENV{'PATH_TRANSLATED'}"; $systempath =~ s/(\\[a-z0-9]*\.pl)$//g; unless ($systempath) { $systempath = "$ENV{'SCRIPT_FILENAME'}"; $systempath =~ s/(\/[a-z0-9]*\.pl)$//g; } ## End unless # $operatingsystemoldnt = 1; # $slash = '\\'; $slash = '/'; } ## End if else { $operatingsystem = 1; $systempath = "$ENV{'SCRIPT_FILENAME'}"; $systempath =~ s/(\/[a-z0-9]*\.pl)$//g; if ($systempath =~ /cgiwrap/) { $systempath = "$ENV{'PATH_TRANSLATED'}"; $systempath =~ s/(\/[a-z0-9]*\.pl)$//g; } ## End if $slash = '/'; } ## End else ## $systempath = "systempath to your folder"; ## Enter the correct value and un-comment this if you are having system path detection problems push (@INC, "$systempath"); } ## End BEGI print "Content-type:text/html\n\n"; ## Directory navigator $directorypath = "c:/"; my @directories; my @variables; my $directoryname = 1; push (@directories,"$directorypath"); until ($directoryname eq "rerasfsdfsdfsdf") { $directoryname = shift (@directories); chomp($directoryname); opendir(CURRENTDIR, "$directoryname"); @dirfiles = readdir (CURRENTDIR); closedir(CURRENTDIR); foreach $filename (@dirfiles) { chomp($filename); unless ($filename eq "." || $filename eq "..") { if (-d "$directoryname/$filename") { push (@directories,"$directoryname/$filename"); print "$directoryname/$filename\n"; } ## End if } ## End unless } ## End loop } ## End loop