in reply to Re: "force string context"?
in thread "force string context"?

I suspect that the guilty programmer was practicing cargo-cult techniques.

Putting "$variables" in quotes might make people feel better about the way that Perl can "randomly change scalars from data to garbage, without warning or provocation," but it actually serves no real purpose. People coming from a language with strong typing generally feel that there is something strange about Perl, because they are giving up direct control over the representation of data.

The reality of the situtation is that strings stay strings forever and ever, right up to the time that they are used in a numeric operation, and numbers stay numbers forever and ever, until they are used in string operations. So anybody who thinks that Perl might mangle their data should relax, and if they realize that "eq" and == are different, everything will be just fine.