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."
In reply to Re: Little annoying mistakes ... of others
by Your Mother
in thread Little annoying mistakes ... of others
by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |