sub foo { "foo" =~ m/(oo)/; print "foo(@_)"; } "test" =~ m/(es)/; foo($1); # gibt 'oo' aus und nicht 'es'