in reply to Converting Column Into Row

Sure ... just add the data into a hash of arrays where the key is the stuff before the = and the value is an array of the stuff afterwards:

#!/usr/bin/perl use strict; use warnings; my %hash; while( <DATA> ) { chomp; next unless $_; my( $key, $val ) = split( /\s+=\s+/, $_ ); push( @{$hash{$key}}, $val ); } foreach my $key ( sort keys %hash ) { print $key, " = " . join( ',', @{$hash{$key}} ), "\n"; } __DATA__ A = 1 A = 2 A = 3 B = 5 B = 1 B = 7 C = 4

-derby