in reply to Re: html parsing
in thread html parsing

"You could get the contents of the <title> tag just using a regular expression"

Solutions that use regular expressions to parse HTML will never be voted higher than those that actually use a parser. Also your assignment is very low value because it explicitly uses $1 when you could have instead captured the value directly (and safer too).

Replies are listed 'Best First'.
Re^3: html parsing
by shmem (Chancellor) on Mar 22, 2017 at 15:40 UTC

    I'd downvote my answer, if I could, not only for the shameless plug.

    Also your assignment is very low value because it explicitly uses $1 when you could have instead captured the value directly (and safer too).

    Providing code for that end might significantly improve this subthread.

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
      I was hoping you would do that. :)
      (my $title) = $res->content =~ m|<title>([^<]+)</title>|i;