That is usually written like this:
my %seen; my @uniq = grep !$seen{$_}++, @proc_name1;
And if you want to localize the scope of the hash you could do it like this:
my @uniq = do { my %seen; grep !$seen{$_}++, @proc_name1; };
In reply to Re: to select unique characters
by jwkrahn
in thread to select unique characters
by Abhisek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |