Perl/Shell Knowledge Sharing
Perl Interview Questions and Answers
Monday, December 27, 2010
How to remove duplicates from a hash
#How to remove duplicates from a hash
use Data::Dumper;
my %hash = qw/ a z b z c x d x e y f g h i /;
print Dumper \%hash;
%hash = reverse %{{ reverse %hash }};
print Dumper \%hash;
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment