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


in reply to File handles in regular expressions

What do you mean by "if they match"? Do you mean, "if they are identical strings"? If so, string comparison (using the eq operator) is almost certainly a better idea than using regexes.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'