Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Hash slice from a hashref

by davorg (Chancellor)
on Sep 07, 2006 at 13:52 UTC ( #571688=note: print w/replies, xml ) Need Help??


in reply to Hash slice from a hashref

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}.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://571688]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (13)
As of 2016-09-26 19:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (489 votes). Check out past polls.