http://www.perlmonks.org?node_id=284724

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

ah, can someone please explain why the hell only "trigger1" triggs in the code below..it's driving me insane..it's the exact same code for gods sake?!!
my $title = q(the 2000); if ($title =~/^the ( *?)\d\d\d\d$/ig) { print "\ntrigger1" #PRINTS } if ($title =~/^the ( *?)\d\d\d\d$/ig) { print "\ntrigger2" #NO PRINT }


TIA,
Tom