[Mpls-pm] Dereferencing complicated things...
Ken Williams
ken at mathforum.org
Wed Dec 7 09:49:37 PST 2005
On Dec 7, 2005, at 8:14 AM, Eric Estabrooks wrote:
> Ken Williams wrote:
>
>> Double correction, it should have been:
>>
>> $a = {b => [1,2,3]}
>>
>> The solution you're looking for is:
>>
>> @result = @{ $b->{b} };
>>
> I hate to disagree but you need to do a double dereference on $b since
> its a ref to a scalar that holds a ref to a hash.
Ah yes, I misread that in the first message - probably because Dave
asked about using $b->{b}, which actually doesn't exist, so I
subliminally figured he didn't actually mean to have the double-layered
reference.
-Ken
More information about the Mpls-pm
mailing list