>perl -le"for (1..2) { print 'ab' =~ /a/g ? 'match' : 'no match' }" match no match