programingnoob
Technical User
Hi,
I have this parse program.
use warnings;
use HTML::TreeBuilder 3;
my $root = HTML::TreeBuilder->new_from_file("browseshop[1].txt"
;
$flash = $root->find_by_attribute('onclick', "if ( !confirm ('Are you shure') ) { return false; }"
;
$flash->attr("src"
;
print $flash->dump;
$root->delete();
#EOF
This program will return 2 matches. The eariler match is a link, and the latter one is an image. I only want the first match, which is the link. How do I do taht?
Thanks
I have this parse program.
use warnings;
use HTML::TreeBuilder 3;
my $root = HTML::TreeBuilder->new_from_file("browseshop[1].txt"
$flash = $root->find_by_attribute('onclick', "if ( !confirm ('Are you shure') ) { return false; }"
$flash->attr("src"
print $flash->dump;
$root->delete();
#EOF
This program will return 2 matches. The eariler match is a link, and the latter one is an image. I only want the first match, which is the link. How do I do taht?
Thanks