print join "+", @{$r}{@l}
The general rule is that when dealing with references you can replace a hash name with {$ref}. So @hash{@keys} becomes @{$ref}{@keys}.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: Hash slice from a hashref
by davorg
in thread Hash slice from a hashref
by Random_Walk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |