Wiggins d'Anconia wrote:

>Jan Eden wrote:

>>$$PCEs[$cn]{$dh{"id"}} ...
>>
>
>Adding an extra $ here causes Perl to look for $PCEs a scalar, which
>doesn't exist rather than dereference the PCEs array.
>
Ok, I thought of a construction like

$ {$PCEs[$cn]} {$dh{"id"}} ...

This should be equivalent to the arrow notation below, since $PCEs[$cn] is evaluated 
first. But I cannot omit the curly braces since the variable which holds the reference 
is not a simple scalar. Thanks for correcting me.

>>Alternatively, you could improve the readability by using the arrow
>>dereference, though:
>>
>>$PCEs[$cn]->{$dh{"id"}} = $dh{"ridPCE"};
>>
>
>Using the arrow operator is a good idea for readability but isn't
>related to your extra $ above.

Jan
-- 
Either this man is dead or my watch has stopped. - Groucho Marx

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to