It can also be written as:
push @{ $res{$_->[2]} }, $_ for @arr;
Some people are finicky about map in void context.
In reply to Re^5: slicing array based on values but not index
by ikegami
in thread slicing array based on values but not index
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |