This would initialize the hash value to an empty array ref, when necessary.my $array = $hash->{$key} ||=[];
"Income tax returns are the most imaginative fiction being written today." -- Herman Wouk
In reply to Re^4: creating defined references to arrays of size zero
by NetWallah
in thread creating defined references to arrays of size zero
by spieper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |