Thanks to everyone for the answers provided. I will work through them.
Just as background, I've been on an intense learning curve over the last
several weeks - object oriented Perl, LWP, getting access to secure
websites (HTTPS) to work etc.
I got to the point where I wanted to prototype access to a specific
website where I know the data that I am looking for and extract it with
a simple script.
I do appreciate the feedback that ultimately - as part of my journey
with web client programming - I need to learn how to use HTML parsers.
Best regards, Edward
On 3/05/2013 9:59 PM, Edward and Erica Heim wrote:
Hi all,
I'm using LWP::UserAgent to access a website. One of the methods
returns HTML data e.g.
my $data = $response->content;
I.e. $data contains the HTML content. I want to be able to parse it
line by line e.g.
foreach (split /pattern/, $data) {
my $line = $_;
......
If I print $data, I can see the individual lines of the HTML data but
I'm not clear on the "pattern" that I should use in split or if there
is a better way to do this.
I understand that there are packages to parse HTML code but this is
also a learning exercise for me.
Thanks in advance, Edward
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/