{ my @data; my $table; foreach my $k (keys %input) { foreach (@{$input{$k}}) { chomp(); push( @{@data[$.]},( split /[,\n]/, $_)); } } $table .= "