Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Use function as a regex

by salva (Canon)
on Feb 15, 2018 at 16:59 UTC ( [id://1209239]=note: print w/replies, xml ) Need Help??


in reply to Re: Use function as a regex
in thread Use function as a regex

say 'perl Perl PERL' =~ /${ \Re::re() }/g;

Abusing the internal representation of regular expressions, this also seems to work:

say 'perl Perl PERL' =~ /${Re::re()}/g;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1209239]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2024-04-18 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found