in reply to Arrays and Hashes woes
my %tmpF=(); my @tmpA; push(@tmpA,"0001"); %tmpF->{ID}=@tmpA; push(@$fieldobj,%tmpF);
should be
my %tmpF=(); my @tmpA; push(@tmpA,"0001"); %tmpF->{ID}=\@tmpA; # ^ push(@$fieldobj,\%tmpF); # ^
Please read perlreftut to understand why you need references, and how they work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Arrays and Hashes woes
by TienLung (Acolyte) on Mar 16, 2009 at 11:27 UTC |