in reply to Re: Regex question
in thread Regex question

The substitution operator always returns either true (1) if the substitution succeeded
Just to elaborate, from perlop:
returns the number of substitutions made
So, 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.