in reply to Building Hashrefs
First, perldoc perlref is your friend!
Have a look and your life will be much better.
In your example, the structure $scalar->{} will autovivify (*) an anonymous HASH reference, just as:
my $hash_ref = {}; ${$hash_ref}{foo} = "bar";
(*) More about autovivification: http://tlc.perlarchive.com/articles/perl/ug0002.shtml
Updated: Fixed typos =/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Building Hashrefs
by pbeckingham (Parson) on Jul 23, 2004 at 14:54 UTC | |
by deibyz (Hermit) on Jul 23, 2004 at 15:06 UTC |