in reply to to select unique characters
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 Section
Seekers of Perl Wisdom