Hi All,
Below is the program I'm using... It works but I'm getting an error
message... Can you please tell me what I'm doing wrong? I listed the error
below... Thanks so much for all your help. PS: The program will not fun if
I use strict;
------------------------------ start
-----------------------------------------------------------
1 #!/usr/bin/perl -w
2
3 use Regexp::Common qw /URI/;
4
5 $dir = "/Program Files/OptiPerl/test_files";
6 opendir (BIN, $dir) or die "Can't open $dir: $!";
7 while ( defined ($file = readdir BIN) ) {
8
9 # ----------- load @ARGV for <> operator --------------------
10
11 @ARGV = grep { !/^\./ } readdir BIN;
12
13 while (<>) {
14 print "$ARGV contains an HTTP URI\n" and close(ARGV) and next
15 if /$RE{URI}{HTTP}/;
16
17 }
18
19 closedir (BIN);
20 }
************ error I'm getting / program works ************
Name "main::file" used only once: possible typo at C:\Program
Files\OptiPerl\test_web_7.pl line 7.
70072.TXT contains an HTTP URI
70071.TXT contains an HTTP URI
70070.TXT contains an HTTP URI
Thanks!
Brian Volk
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>