my $von = '087'; my $bis = q{"}; while () { if (m/$von(.*?)$bis/) { print "Match $1 gefunden \n"; } } __DATA__ "08749-6948452 W-Germany" "086948452 W-Germany"