SPUG: parsing a web page

Umar Cheema umar at drizzle.com
Thu Sep 16 14:33:10 CDT 2004


You can try this:

@content= split /\n/, get("http://google.com");



On Thu, 16 Sep 2004, Luis Medrano wrote:

> List,
> I'm trying to parse a web page but I don't understand the following:
> 1.-I get the content of the page using this script:
> 
> #!/usr/bin/perl
> use LWP::Simple;
> @content=get("http://google.com");
> print "$content[0] \n";
> 
> 2.-but all the content is $content[0] like if was just one line of content. 
> 
> Any of you know what is going on?
> 
> Thanks,
> Luis
> 
> _____________________________________________________________
> Seattle Perl Users Group Mailing List  
> POST TO: spug-list at mail.pm.org  http://spugwiki.perlocity.org
> ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list
> MEETINGS: 3rd Tuesdays, Location Unknown
> WEB PAGE: http://www.seattleperl.org
> 





More information about the spug-list mailing list