That reminds me that some time back I tried to get a grip on hash slices.
In similar use to your example:
my @intersection = grep {defined} @{{map {$_=>$_} @a}}{@b}Though in everyday life I prefer your method, since I tend to get headache from thinking about that slices and also definitely got the syntax and/or semantics wrong the first time always.
In reply to Re^2: What I Most Recently Learned in Perl, But Should Have Already Known
by pKai
in thread What I Most Recently Learned in Perl, But Should Have Already Known
by liverpole
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |