> Searches a string for a pattern, and if found, replaces that pattern with the replacement text and returns the number of substitutions made.
Your s/// replaced once, so it returned 1. Run the substitution before printing the result.
In reply to Re: One liner is returning unexpected "1" on the output and I do not understand the mechanism at play.
by choroba
in thread One liner is returning unexpected "1" on the output and I do not understand the mechanism at play.
by perlynewby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |