Wally Hartshorn has asked for the wisdom of the Perl Monks concerning the following question:
...but I would like to make it one line to eliminate the pointless $array_ref. Unfortunately, I can't work out the proper syntax. Something like this...my $array_ref = $hash_ref->{$object->method}; push @$array_ref, "something";
...but correct! Can someone help?push @($hash_ref->{$object->method}), "something";
Wally Hartshorn
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Syntax to dereference array_ref in a hash_ref?
by Transient (Hermit) on Jun 08, 2005 at 19:23 UTC | |
|
Re: Syntax to dereference array_ref in a hash_ref?
by Roy Johnson (Monsignor) on Jun 08, 2005 at 20:23 UTC |