in reply to Not getting this assignment ...
Each key ($lv) of the hashCellID hash table points to an array
of cellID's. Presumably as new cellID's are seen for an lv, they
are pushed onto the array for that lv.
push (@{$hashCellID{$lv}} , $cellID);
At the end of the day, each lv in the hashCellID table will correspond to an array of cellID's of unknown length. And this array can be printed like: print "@{$hashCellID{$lv}}\n";
To find out the keys of the hashCellID hash:
The hashCellname just counts how often a particular cellname has occurred.foreach my $lv (keys %hashCellID) { print "$lv = @{$hashCellID{$lv}}\n"; }
foreach my $cell (keys %hashCellname) { print "$cell count = $hashCellname{$cell}\n"; }
|
|---|