for my $i (1..2) { print "match\n" if "x1" =~ /x${print "doing arg\n"; \1}/o; }