in reply to Using the result of s///

In the first case, you print the return value from the substitution. In the second, you print the string the substitution was performed on.

The return from s// is a fairly complex matter which depends on context, the /g option, and whether backreference capturing is attempted. See perlop and perlre for details.

After Compline,
Zaxo