in reply to Need to get hash of arrays
The Command Switches -a, -F, and -n do most of the work.
#!perl -aF/\|/ -n use strict; use warnings; our %hash; push @{$hash{$F[0]}}, $F[1]; END{ use Data::Dumper; print Dumper(\%hash); }
Bill
|
---|
In Section
Seekers of Perl Wisdom