You do not need to initialize your structure at all due to Perl's autovivification: all intermediates are created automatically. The syntax below should work in both versions of Perl you are using.
use strict; use warnings; my %exonHash; my $exonNumber = 1; my $med = 3; push @{ $exonHash{ $exonNumber }->[ 2 ] }, $med;
In reply to Re: 2D array in Perl
by hdb
in thread 2D array in Perl
by Perl_ca_user
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |