[Tutor] Perl Symbology (was: Are you allowed to shoot camels?)

Max Noel maxnoel_fr at yahoo.fr
Thu Feb 10 20:58:55 CET 2005

On Feb 10, 2005, at 19:50, Bill Mill wrote:

> so "#{<variable}" seems to do it. The googling shows that there are a
> myriad of other ways, which I haven't even looked at. They all seem to
> involve #{[symbol]<variable>} .

	Here, [symbol] refers to the scope(?) of the variable. See the 
discussion between me and Alan on this topic a while ago -- the use of 
these symbols being his main criticism of Ruby.

foo is a local variable
$foo is a global variable
@foo is an instance variable
@@foo is a class variable
FOO is a constant (which can be modded into global, instance or class 
with the appropriate use of $, @ or @@)

-- Max
maxnoel_fr at yahoo dot fr -- ICQ #85274019
"Look at you hacker... A pathetic creature of meat and bone, panting 
and sweating as you run through my corridors... How can you challenge a 
perfect, immortal machine?"

More information about the Tutor mailing list