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


in reply to Re: Regular expressions and sort
in thread Regular expressions and sort

I was also eyeballing the statement $mask=/_(\d\d)_/ . After some investigation with use re 'debugcolor', it turns out that the /_(\d\d)_/ gets compiled but nothing is stored in $mask. In effect, the statement

$_[0] =~ /$mask/ is equal to $_[0] =~ //