Abhisek has asked for the wisdom of the Perl Monks concerning the following question:
After locating the 15 character long values .There are when i have the same 15 character long value reapeated number of times !!!! Now i wish to find only the unique ones occurence of it. I found this code on the web. What do you suggest me here.
%seen = (); @uniq = (); foreach $item (@proc_name1) { unless ($seen{$item}) { $seen{$item} = 1; push (@uniq, $item); } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: to select unique characters
by mickeyn (Priest) on Feb 13, 2008 at 07:26 UTC | |
Re: to select unique characters
by jwkrahn (Abbot) on Feb 13, 2008 at 08:03 UTC | |
Re: to select unique characters
by johngg (Canon) on Feb 13, 2008 at 10:42 UTC | |
Re: to select unique characters
by kyle (Abbot) on Feb 13, 2008 at 17:53 UTC |
Back to
Seekers of Perl Wisdom