Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Concerning hash operations (appending, concatenating)

by ABCXYZ (Novice)
on Dec 25, 2012 at 23:06 UTC ( #1010293=note: print w/ replies, xml ) Need Help??


in reply to Re: Concerning hash operations (appending, concatenating)
in thread Concerning hash operations (appending, concatenating)

<This is one idiom,

<%hash = (%hash, e => 'f', g => 'h', i => 'j'); <%hash = (%otherhash, %hash);

This code reminds me of writing the comma operator in this way: ",=", so to concatenate a hash:

my %hash1 =qw/ One 1 Two 2 Three 3/; my %hash2 =qw/ Four 4 Five 5 Six 6/; %hash1 ,= %hash2; say keys %hash1;

And I've checked it, it works in Perl6, the future version of Perl.


Comment on Re^2: Concerning hash operations (appending, concatenating)
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-11-29 05:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (203 votes), past polls