in reply to Re: calling subroutines within a regular expression?
in thread calling subroutines within a regular expression?

And then there is the always useful (if ever-homely):
>perl -wMstrict -le "use constant RX => qr{ [atc]{3} }xms; my $s = 'the cat in the hat'; print qq{found a $1} if $s =~ m{ ( @{[ RX ]} ) }xms; " found a cat