The substitution operator always returns either true (1) if the substitution succeededJust to elaborate, from perlop:
returns the number of substitutions madeSo, as in the case of the OP, s/// will return 1 if a substitution is made, but s///g can return more than 1 if many substitutions are made.
In reply to Re^2: Regex question
by toolic
in thread Regex question
by drewman08
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |