in reply to Perl sorting unique values
If ever you find yourself thinking "I need to get the unique values of $THING" you should consider using a hash, iterating through the values for $F[2] and incrementing $hash_of_f2{$F[2]} would give you a set of unique values available as keys %hash_of_f2 which you could then sort
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Perl sorting unique values
by pr09 (Novice) on Jun 22, 2011 at 09:21 UTC | |
by wind (Priest) on Jun 22, 2011 at 10:14 UTC |
In Section
Seekers of Perl Wisdom