in reply to de-ref an array from HoA
when you should havepush @{$p2i{sp}}, $ipr; # $ missing for key reference
push @{$p2i{$sp}}, $ipr;
when you should haveprint "$key\t$p2i{$key}\n";
print "$key\t@ {$p2i{$key} }\n"; # need @ to dereference array
when you should haveif (exists $p2i{$user}) { print "$user is in the hash. \n";if (exists $p2i{$user}) { print "$user is in the hash. \n";
if (exists $p2i{$user}) { print "$user is in the hash. \n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: de-ref an array from HoA
by stalkeyefly (Novice) on Jun 17, 2004 at 14:37 UTC |