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

Re: Re: Chaining string ops

by roju (Friar)
on Aug 28, 2003 at 19:25 UTC ( [id://287496]=note: print w/replies, xml ) Need Help??


in reply to Re: Chaining string ops
in thread Chaining string ops

Could we not have it both ways? After all, this is perl....

if ($s =~ s/change/me/)
and
$str = "some string" =~ s/a/b/r =~ s/foo/bar/r

where /r is the newly created "chaining" modifier that forces a /r/eturn of the new string. Make it have no side effects either (ie. not touch the original string), and it'd fill a need.

Update: changed /c to /r, seeing as /c is taken.

Log In?
Username:
Password:

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

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

    No recent polls found