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


in reply to Bug in script, regex help req extreme urgent

Use a look-behind assertion. Rather than looking for the string 'module ' then testing if the $ARGV[2] string follows, look for the $ARGV[2] string and see if it is preceded by the string 'module '.

my $match = "(?<=module )$ARGV[2]"

Using Look-ahead and Look-behind