in reply to Assignment of Arrays of Hashes
use Data::Dumper; my @selector = ("field1", "field2", "field3", "field4"); my @RefHash; while (<DATA>) { chomp; my @inLine = split /,/; my %content; @content{@selector} = @inLine; push @RefHash, \%content; } print Dumper \@RefHash; __END__ foo,bar,baz,quux one,two,three,four ichi,ni,san,shi
_________
broquaint
update: uncaught exception ENOCAFFENE thrown
|
|---|