
Karazam
User
Mar 12, 2011, 3:42 PM
Views: 4619
|
|
Re: [spuds] Manipulating a Hash with keys that have more than one value
|
|
|
Oh, maybe like this then:
for my $x ( sortit() ) { unless ( $seen{$x->[1]} ) { print "$x->[0]\t$x->[1]\n"; $seen{$x->[1]}++; } else { print STDERR "Oh noes! Duplicate: $x->[0] $x->[1]\n"; die; } }
(This post was edited by Karazam on Mar 12, 2011, 3:57 PM)
|