Krambambuli has asked for the wisdom of the Perl Monks concerning the following question:
will print#!/usr/bin/perl use warnings; use strict; use HTML::TreeBuilder; my $html = <<'HTML'; <a href="http://www.nowhere.com/?action=a1&param=p1">Some text</a> HTML my $tree = HTML::TreeBuilder->new_from_content( $html ); for my $elt ($tree->look_down ('_tag', 'a')) { print "\nA " . $elt->attr ('href') . "\n\n"; }
whereas I'd want to getA http://www.nowhere.com/?action=a1¶m=p1
instead. Is there a way... ?A http://www.nowhere.com/?action=a1&param=p1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get undecoded html entities with HTML::TreeBuilder
by shmem (Chancellor) on May 17, 2007 at 21:40 UTC | |
by naikonta (Curate) on May 18, 2007 at 01:42 UTC | |
by Krambambuli (Curate) on May 20, 2007 at 09:42 UTC |