in reply to eval failing to match regex after sometime
g is not a regex modifier (see qr//), it is an match operator ( m// ) and substitution operator ( s/// ) option
http://perldoc.perl.org/perlop.html#Regexp-Quote-Like-Operators