
Karazam
User
Mar 12, 2011, 3:30 PM
Views: 4705
|
|
Re: [spuds] Manipulating a Hash with keys that have more than one value
|
|
|
You mean like this situation?
aRule rulenumber=1 bRule rulenumber=2 cRule rulenumber=3 dRule rulenumber=3 If so, what would you want the output to be in that case? Edit: If you simply want to skip the dRule line, then this modification might be what you need.
for my $x ( sortit() ) { print "$x->[0]\t$x->[1]\n" unless $seen{$x->[1]}; $seen{$x->[1]}++; }
(This post was edited by Karazam on Mar 12, 2011, 3:38 PM)
|