Better written as:return grep { $u{ $_ } ? ( $u{ $_ }-- , $_ ) : () } split //, $str2;
return grep --$u{ $_ } >= 0, split //, $str2;
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: Unique List of Common Characters Between Two Strings
by merlyn
in thread Unique List of Common Characters Between Two Strings
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |