Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Mini-Tutorial: Dereferencing Syntax

by tobyink (Abbot)
on Jun 20, 2012 at 19:50 UTC ( #977462=note: print w/ replies, xml ) Need Help??


in reply to Mini-Tutorial: Dereferencing Syntax

It's also worth noting that the following are two completely different things.

@hash{'key1', 'key2'} $hash{'key1', 'key2'}

The first one is basically a shorthand for:

($hash{'key1'}, $hash{'key2'})

The second one is:

$hash{join($;, 'key1', 'key2')}

... where $; is the subscript separator, which defaults to \034.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re: Mini-Tutorial: Dereferencing Syntax
Select or Download Code
Replies are listed 'Best First'.
Re^2: Mini-Tutorial: Dereferencing Syntax
by jdporter (Canon) on Jun 20, 2012 at 21:51 UTC

    And similarly (though not identically, certainly) for arrays.

Re^2: Mini-Tutorial: Dereferencing Syntax
by ikegami (Pope) on Sep 17, 2012 at 05:36 UTC
    The difference between hash lookups and hash slices has nothing to do with references or how to use them. I shall not add such a note.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2015-07-30 11:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls