Skip to content

Instantly share code, notes, and snippets.

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