I'm working with HTML::Element via HTML::TreeBuilder and its attractive look_down method. I am curious about changing the attributes of a tag for an HTML tree object.
Let's say I start at the root element 'hmtl', and I want to add a summary to the second table.
my $url = 'http://fire.org/';
my $content = get($url);
my $page_tree = HTML::TreeBuilder->new_from_content($content);
my @tables = $page_tree->look_down(_tag=>'table');
my $summary = 'make it for real';
The syntax for setting an attribute is:
$tables->attr('sumary', 'Put your summary here');
The following syntax does NOT work
$tables->attr('summary') = $summary;