Jeff 'japhy' Pinyan wrote:


%hash->{$key} and @array->[$idx] are syntaces that you should not use. The fact that they work is due to intricacies of the Perl parser. Similarly, %{$hashref}->{$key} and @{$arrayref}->[$idx] are equally bad.

Use $hash{$key} and $array[$idx] for normal hash and array access. When using hash and array references, you have two choices: $hash->{$key} and $array->[$idx], or $$hash{$key} and $$array[$idx].

Thanks Japhy
Both $hash->{$key} and $$hash{$key} work fine and this also works Although I'm not sure why.... ${$hash}{$key}.

I seem to have a lot of problems with the perl language in that there are so many ways to accomplish (express) the same thing.... A wonderful feature but sometimes confusing as hell (to me at least).

Anyway thanks again - Problem solved! No more error messages.
Best regards
Tony Frasketi



--
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