Quoting issue. Single quotes can't be nested, so foo and pm are unquoted, i.e. interpreted as barewords, and as no such functions exist, they're turned into strings and concatenated by the dot operator.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Comment on Re^5: Remove similar key=value pair from HOH
Ah! Looking at Re^2: Remove similar key=value pair from HOH again, I see it's run without strictures and apparently on a *nix system. Interesting. I was trying to reproduce on Windows: I guess Windows has to be good for something!