in reply to Use function as a regex
#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; { package Re; sub re { qr/perl/i } } say 'perl Perl PERL' =~ /${ \Re::re() }/g; say 'perl Perl PERL' =~ /(??{ Re::re() })/g;
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Use function as a regex
by salva (Canon) on Feb 15, 2018 at 16:59 UTC |