Brian Volk <[EMAIL PROTECTED]> wrote:

:: 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

    Do 00047.TXT, 00311.TXT, and open 00324.TXT actually
exist in the directory in which you tried to open them?


: 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/68674917D
: 62B62C3852567D 8004E39BE?OpenDocument
: 70070.txt
: http://www.spartanchemical.com/sfa/MSDSRep.nsf/docid/0BA3D2C7A
: F46CE8D852567D 3004E6108?OpenDocument
: 
: really confused!


    Here's something weird. The errors are on line 28,
but the script you gave us is only 18 lines long. How's
about showing us the first 40 lines of the script. Then
tell us which line you changed and what that line looked
like each time you changed it.

HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to