my $mydir = 'Where/the/directory/is'; opendir (MYDIR, $mydir) or die "Could not opendir $mydir: $!\n"; my @numfiles = grep { /^\d{4}.*\.html$/} readdir MYDIR; closedir(MYDIR); print "<UL>\n"; for (@numfiles) { print qq! <LI><A HREF="$_">$_</A></LI>\n!; } print "</UL>\n";
Quick notes:
In reply to Re: finding specific files
by turnstep
in thread finding specific files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |