Correct, the return value of s/// and tr[][] is the number of substitutions made. However you are not returning the return value of s/// or tr[][], you are returning either the value of $_ or the empty list ().
In reply to Re^4: Basic list manipulation, and a bit of map() confusion...
by jwkrahn
in thread Basic list manipulation, and a bit of map() confusion...
by cmv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |