Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Can anyone figure this out?

by chipmunk (Parson)
on Jun 04, 2001 at 06:35 UTC ( [id://85396]=note: print w/replies, xml ) Need Help??


in reply to Can anyone figure this out?

It turns out that this is as simple as it sounds. s///g returns the number of matches found. The replacement in the substitution here is entirely irrelevant, as are the three /e modifiers.

The subroutine could be rewritten as:

sub { $_ = pop; s/\d//g; }
It took me a little while to figure it out, though. :)

Log In?
Username:
Password:

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

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

    No recent polls found