my $string = 'http://blah/'; my ($proto) = $string =~ m#^([a-z]+)://#; if (defined $proto) { print "Dies ist ein $proto-Link\n"; }