my ($toss, @list) = split /\s*([A-Za-z]+)\s*\=\s*/; my @row; while (@list) { push @row, { field => shift @list, value => shift @list }; } push @rows, \@row;