Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: can regex contains function?

by choroba (Cardinal)
on Jun 19, 2020 at 07:49 UTC ( [id://11118257]=note: print w/replies, xml ) Need Help??


in reply to can regex contains function?

> can regex contains function?

Yes, it can. That's what /e is for.

$t =~ s/(?<=\s)(.)/uc $1/ge;

But you don't need it here:

$t =~ s/(?<=\s)(.)/\U$1/g;

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-19 22:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found