for( 0..$#facfields ) { push @{ $facdata{$facfields[$_]} }, $facrow[$_]; } # or push @{ $facdata{$_} }, shift @facrow for @facfields;