Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: s///g and capturing all matches

by Random_Walk (Parson)
on Dec 16, 2011 at 09:59 UTC ( #943926=note: print w/ replies, xml ) Need Help??


in reply to Re: s///g and capturing all matches
in thread s///g and capturing all matches

Hi Jethro,

and the answer to life, the universe and everything is 42 ;)

I was wondering why the implementations differ, as well as seeking an ellegant way to get the behaviour I wanted. If s///; returned a list of the items sub'd out then it would be easy enough to use that in scalar contect to have the number. Felt rather un-Perlish to miss out on potential utility.

Cheers,
R.

Pereant, qui ante nos nostra dixerunt!


Comment on Re^2: s///g and capturing all matches

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (16)
As of 2015-07-30 16:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls