in reply to How do I create a new array in memory?
The other way to do it is to take a copy of the array each time by using the anonymous array constructor.
while (<>) { my @record = split /,/; my $key = shift @record; $list{$key} = [@record]; } [download]