my @strings = ( 'http://foo.example.org/', 'mms://bar.example.org/', 'https://foobar.example.org/', 'http:///tmp/foobar.txt', ); for my $str ( @strings ) { if ( substr($str,0,8) eq 'http:///' ) { print "Treffer 'http' bei $str\n"; } }