ctp has asked for the wisdom of the Perl Monks concerning the following question:
As always - many thanks in advance!#!usr/bin/perl use warnings; use strict; my $dir = "/Users/ctp/perlwork"; opendir (DIRHANDLE, $dir) or die "can't open $dir: $!"; print "<HTML>\n<HEAD></HEAD>\n<BODY>\n"; while ( defined (my $file = readdir DIRHANDLE)) { next if $file =~ /^\.\.?$/; print "<B>$file</B><BR>\n" if -d "$dir/$file"; print "$file<BR>\n" if -T "$dir/$file"; } closedir (DIRHANDLE); print "</BODY>\n</HTML>\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: reading files and directories
by Hena (Friar) on Jan 07, 2004 at 09:13 UTC | |
|
Re: reading files and directories
by grinder (Bishop) on Jan 07, 2004 at 09:59 UTC | |
by ysth (Canon) on Jan 07, 2004 at 19:21 UTC | |
|
Re: reading files and directories
by DrHyde (Prior) on Jan 07, 2004 at 09:53 UTC | |
|
Re: reading files and directories
by Anonymous Monk on Jan 07, 2004 at 09:01 UTC | |
by ctp (Beadle) on Jan 07, 2004 at 16:01 UTC | |
by ysth (Canon) on Jan 07, 2004 at 19:29 UTC | |
by ctp (Beadle) on Jan 08, 2004 at 02:53 UTC | |
|
Re: reading files and directories
by crabbdean (Pilgrim) on Jan 07, 2004 at 15:42 UTC |