this would surprise me
DB<71> use warnings; $a=(1..2)[9] DB<72>
> so you might want to use eval: my $date = eval { $d->content->[1] }
Thats why the use is of ->content is discouraged and ->content_array_ref is offered
$content_array_ref = $h->content_array_ref(); # never undef
"This is like content (with all its caveats and deprecations) except that it is guaranteed to return an array reference."
> (All code obviously untested.)
dito! :)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re^2: HTML::Element accessing "internal attributes" the proper way
by LanX
in thread HTML::Element accessing "internal attributes" the proper way
by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |