my @keys = ...order you want the named keys in... for my $h (@list) { print join(",", $h->{first}, $h->{date}, map { $_." ".$h->{$_} } @keys), "\n"; }