Skip to content

Instantly share code, notes, and snippets.

@masaedw
Forked from yoppi/a.pl
Created October 4, 2011 09:07
Show Gist options
  • Save masaedw/1261198 to your computer and use it in GitHub Desktop.
Save masaedw/1261198 to your computer and use it in GitHub Desktop.
my $t;
while (<>) {
my ($key, $value) = split;
push @{$t->{$key}}, $value;
}
foreach $key (keys %{$t}) {
my $s = join ", ", @{$t->{$key}};
print "$key $s\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment