Jeff Pang wrote:

2007/9/12, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:

If this is how I get external content of the file, how do I loop
through every line of the $content?

#!/usr/bin/perl
use LWP::Simple;
$url = 'http://site.com/page.html";;
$content = get $url;
print $content;

my @c=get "http://www.google.com/";;
print for @c;

This also print line by line.

This is just misleading nonsense. @c will consist of just a single
element, containing the entire contents of the web page. It has
exactly the same effect as

 my $c = get "http://www.google.com/";;
 print $c;

There really is no excuse for posting this sort of junk Jeff: it is
extremely simple to test.

Rob


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


Reply via email to