On Tue, 25 Sep 2001, Jeff 'japhy' Pinyan wrote:
> >my $varref = "var"; #point to the variable named $var
>
> Except that $$varref in this case will point to a package variable named
> $var, and not the $var you've defined here -- symbolic references use the
> symbol table, and my() variables are not stored there.
A good point. Another reason why we don't like symbolic variables. :-)
> >a hard reference (or just reference, since usualyl when people say
> >reference they mean hard reference):
> >
> >my $var = 12;
> >my $varref = \$var; #point to the value in $var
>
> Here, $$varref will access the $var you've defined, and return 12.
Yes, much less of a PITA to use.
-- Brett
http://www.chapelperilous.net/
------------------------------------------------------------------------
Monogamy is the Western custom of one wife and hardly any mistresses.
-- H.H. Munro
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]