here is something even weirder... I just ran the script another dir and here is what it returned. The two files that it work on were the files that I was testing the script on....
Can't open bcv_test.txt: No such file or directory at C:\Program Files\OptiPerl\test_web.pl line 28. Can't open 30691.txt: No such file or directory at C:\Program Files\OptiPerl\test_web.pl line 28. Can't open 03585.txt: No such file or directory at C:\Program Files\OptiPerl\test_web.pl line 28. Can't open 30711.txt: No such file or directory at C:\Program Files\OptiPerl\test_web.pl line 28. Can't open 30712.txt: No such file or directory at C:\Program Files\OptiPerl\test_web.pl line 28. Can't open 30714.txt: No such file or directory at C:\Program Files\OptiPerl\test_web.pl line 28. Can't open 8533-1.txt: No such file or directory at C:\Program Files\OptiPerl\test_web.pl line 28. Can't open rinsefree.txt: No such file or directory at C:\Program Files\OptiPerl\test_web.pl line 28. 70072.txt http://www.spartanchemical.com/sfa/MSDSRep.nsf/docid/68674917D62B62C3852567D 8004E39BE?OpenDocument 70070.txt http://www.spartanchemical.com/sfa/MSDSRep.nsf/docid/0BA3D2C7AF46CE8D852567D 3004E6108?OpenDocument really confused! Brian > -----Original Message----- > From: Brian Volk > Sent: Thursday, July 15, 2004 3:35 PM > To: Beginners (E-mail) > Subject: not sure what I did ? > > 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>