This script was running just fine before I changes the files in the
directory handle. What I don't understand is why the file names are showing
up when I run the script.... very confused.
use strict;
use Regexp::Common qw /URI/;
my $dir = "/Program Files/OptiPerl/test_files";
opendir (TEST, $dir) or die "Can't open $dir: $!";
# ----------- load @ARGV for <> operator below ---------------
@ARGV = grep { !/^\./ } readdir TEST;
# ----------- $1 returns the entire URL {-keep} --------------
while (<>) {
print "$ARGV $1\n" and close(ARGV) and next
if /$RE{URI}{HTTP}{-keep}/;
}
closedir (TEST);
Can't open 00047.TXT: No such file or directory
Can't open 00311.TXT: No such file or directory
Can't open 00324.TXT: No such file or directory
Thanks!
Brian
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>