print "Match1" if "aa1" =~ /^(a)\1(1)$/; #of course this places 1 in $2