#!/usr/bin/perl
use HTML::Parser ();
local $/;
my $html = <DATA>;
sub b ($$$$$$$) {
my ($v1,$v2,$v3,$v4,$v5,$v6,$v7) = @_;
print $v7,"\n";
}
sub start_handler {
return if shift ne "script";
my $self = shift;
$self->handler(text => sub { eval shift }, "dtext");
$self->handler(end => sub { shift->eof if shift eq "script"; },
"tagname,self");
}
my $p = HTML::Parser->new(api_version => 3);
$p->handler( start => \&start_handler, "tagname,self");
$p->parse($html);
print "\n";
_ _ DATA _ _
<th width=15% align=right>Preis</th><script>
b(2302700,"3","Tunesien","DZ/HP","ATT","Kandelorleopatra",193);
b(2302900,"3","Tunesien","DZ/HP","FLY","Sultan-Sipahi",201);
</script>