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'
In Section
Seekers of Perl Wisdom