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

Re: Little annoying mistakes ... of others

by Your Mother (Chancellor)
on Dec 07, 2008 at 02:16 UTC ( #728626=note: print w/ replies, xml ) Need Help??

in reply to Little annoying mistakes ... of others

To extend what ikegami said above-

substitute returns true/false and not the changed string even in map

Substitute does not return true/false. It returns the count of substitutions performed.

perl -le '$str = "A.B.C."; $x = $str =~ s/\w//g; print $x' 3 # or a "1" without the "g."

Comment on Re: Little annoying mistakes ... of others
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2015-11-28 18:28 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (743 votes), past polls