Right, so if you name your child '$0' (note the non-interpolating quotes), when other people try to refer to him/her, they'll force interpolation.
$Bob->Salutation($0);
Bob: Hey, Bob.
$0 : Why are you talking to yourself...?
...and this may very well be the geekiest conversation I've ever had. ++ for that! :-) | [reply] [d/l] |
"Right, so if you name your child '$0' (note the non-interpolating quotes), when other people try to refer to him/her, they'll force interpolation."
Wait, don't single quotes force the variable to not be interpolated? (My question is this: Why does Bob mentioning the name of my kid force interpolation?)
redmist
redmist.dyndns.org
email::redmist
| [reply] |
Yes, so you're naming your kid $0 (the quotes were there so that the myocom script didn't interpolate $0).
I guess in my world, everyone interpolates when they speak (so 'that over there' actually refers to an object). Arguably, though, that happens when you hear/read, so when someone says "What's that over there?" you interpolate that to "What's the hairy monster" (assuming there's a hairy monster over there) and you can answer accordingly.
But for the purposes of our script here, when Bob says "Hey, $0.", $0 (the kid) hears "Hey, Bob." Bob is incapable of producing '$0' without escaping it in some way.
| [reply] |
| [reply] |