if($mech->content()=~ m{$Testzahl(.*?)P}) { my $anzahl= $1/40; print "$1 $anzahl anzanhl\n"; }