my ($col1, $col2, $col3) = generate_data(); $hash{$col1}[0] += $col2; $hash{$col1}[1] += $col3;