[Melbourne-pm] Hash Containing Array

Daniel Pittman daniel at rimspace.net
Sat Mar 21 21:17:15 PDT 2009


Jacinta Richardson <jarich at perltraining.com.au> writes:
> Daniel Pittman wrote:
>
>>>     sub set_acc_via_rule
>>
>> [...]
>>
>>>             unshift @{$self->{_ACC_VIA_RULE}{$key}},$val;
>>
>> You want '$self->{_ACC_VIA_RULE}->{$key}'
>
> FWIW, Perl allows the short-cut Gerd used above, and the two statements:
>
> 	$self->{_ACC_VIA_RULE}{$key}
> 	$self->{_ACC_VIA_RULE}->{$key}
>
> are equivalent.

Really?  Well, I stand corrected, if surprised.

Regards,
        Daniel


More information about the Melbourne-pm mailing list