Substitution provides a return value as number of matches. Thus when proceeded by print statement it provides the 'return value' rather than value of the string. When not proceeded by anything, the return value is simply not captured.my $matches = $string =~ s/_//g; print $matches;
In reply to Re: Using the result of s///
by artist
in thread Using the result of s///
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |