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


in reply to calling subroutines within a regular expression?

Hmmm... Seeing as REGEX is a regular expression in your example, why not just...
# ... if ($s =~ REGEX) { print "found\n"; } # ...