6 Einträge, 1 Seite |
1
2
3
4
5
my $url = "order.jsp";my $content;
if ($content = get($url)){
if($content =~ regexp) {
print $wert
}
1
2
3
4
5
6
7
8
9
10
#! /usr/bin/perl
$content = qq~<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>pt>~;
(@values) = $content =~ /b\([^\)]+?,(\d+)\)/g;
print $_,"\n" for(@values);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/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>
6 Einträge, 1 Seite |