Do you know where your variables are? | |
PerlMonks |
Re: Addressing object variablesby BrowserUk (Patriarch) |
on Sep 03, 2010 at 13:28 UTC ( [id://858711]=note: print w/replies, xml ) | Need Help?? |
Use:
(and why is it different inside of the print statement)? It isn't "different inside a print statement". It is different inside a double-quoted string. Perl usefully interpolates (replaces) recognisable variable names with their current values inside double-quoted strings. But method calls aren't values, they are code execution. To obtain the value you have to run the code, and that'd be more like eval than interpolation. Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|