Sorry i not in your level of experience.
If i want to start a mail about perl to wich email should i adress?
I just got started with hello world, and nothing else run's, iam so sad.


On Fri, May 3, 2013 at 3:45 PM, Brandon McCaig <bamcc...@gmail.com> wrote:

> On Fri, May 03, 2013 at 09:59:49PM +1000, Edward and Erica Heim wrote:
> > Hi all,
>
> Hello,
>
> > 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.
>
> You haven't explained what it is you're trying to do so it's
> impossible for any of us to help you. There is no correct
> "pattern" here. It depends entirely on what the input data can
> be, and what you're trying to accomplish.
>
> What is it that you want to learn? If you want to learn how to
> process HTML data then you don't want to use split to do it. It's
> a flawed and error prone way (there is no /pattern/ that will
> work on all possible HTML inputs). You're far better off learning
> to use one of the HTML parsing modules because that will give you
> a reliable mechanism to process HTML data.
>
> If you just want to learn how to use split then by all means go
> for it. Just don't expect to get meaningful results when
> processing unpredictable HTML data. :)
>
> Give us more information if you want help.
>
> Regards,
>
>
> --
> Brandon McCaig <bamcc...@gmail.com> <bamcc...@castopulence.org>
> Castopulence Software <https://www.castopulence.org/>
> Blog <http://www.bamccaig.com/>
> perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
> q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
> tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iQIcBAEBAgAGBQJRg82gAAoJEE25V9Fzg2acwoQP/A6C4jw47cfFSwQAXxPhnqxS
> dzdm/2ypbNwn/ZmIl0vBfBQD9EEyPAXFW+Xf0AzrOOdv7INa/smQ7bIZvrDCCfmR
> CkjRwzqMxj9mTydidfCHjlv/tjprgyd5TObq/Aa2b8qdJYubrEtx9WM7FxVc1z+a
> yr0ubgtHCbRLAYz8T1mpE0i1Z9obu/ryrkvm7Zf4KK16XEc/jGbMyRGe/l7yZz7l
> saXTixLvqm/Th8XTdrborVXA+BJKgZ0dxXTEqkivEKB4781yPjuyzat0pVL3NmoN
> VxHaEBsCc8eA/E1eGgHByTFvmfaG7zT7h9tP1gt7RVa6K5Nv6tseevI1jhNixkFH
> NTtwTe4yFvZhOne9rvNyVppZiTLTDsCXLjTIxRw7Fb3G85y/gR+Jytsmv2rwFcvH
> 21SpEj5liMiuo/euhR40azY6X40kP8Wljf1oMveLMRckyNnYAiD4cigDxncf4AGb
> UCwmbHn163RebiFPqapWMA9sFls+KGXoPGg9VcLSzU0y4LvPWp/ED0DEw9oYdRGk
> Zo6EuekaeNuAwV4r/rmc2C15wF8R/JT15uPMepOouo+ZSWAgW33wh7Gh0bvwaEUU
> N209udyh96KVICqUDzhN6hZcEpi/q5L0xTQSkFMpJgp6GrgLL7La1LKyzNdeV1Ch
> iFcLVYUtZm07AUfGs0aM
> =cFf8
> -----END PGP SIGNATURE-----
>
>

Reply via email to