I did some research and figured it out...  :-) 

 if /$RE{URI}{HTTP}{-keep}/; 

Thanks!

Brian 

>  -----Original Message-----
> From:         Brian Volk  
> Sent: Thursday, July 08, 2004 3:48 PM
> To:   Brian Volk
> Subject:      Need to see the http://
> 
> Hi All,
> 
> One more for ya...  I have the program below working... some what ;-) but
> I need the module to return the actual URL, not just tell me it the is one
> in the file.  Eventually I'm going to have LWP::Simple inform me if the
> links are active.   Any idea how to extract the actual link from the file?
> 
> 
> Thanks! 
> 
> B
> [EMAIL PROTECTED] 
> 
> 
>       ------------------------------ 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>


Reply via email to