in reply to Construction/initialisation of empty hash
See. perlref and perldata for more info on the {} operator. As for the changes of output between perl versions, I can't seem to replicate them as the above example illustrates.$ perl5.00504 -MData::Dumper -we '%h={};$h{a}=1;print Dumper \%h' Reference found where even-sized list expected at -e line 1. $VAR1 = { 'a' => 1, 'HASH(0x8922a64)' => undef };
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Construction/initialisation of empty hash
by muntfish (Chaplain) on Apr 27, 2004 at 14:52 UTC | |
by Anomynous Monk (Scribe) on Apr 27, 2004 at 17:17 UTC |