Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Hash of Hashes not filling - only using last line of file

by 7stud (Deacon)
on Feb 22, 2013 at 08:04 UTC ( #1020099=note: print w/ replies, xml ) Need Help??


in reply to Hash of Hashes not filling - only using last line of file

use strict; use warnings; use 5.012; my %hash; %hash = ('a' => 10); %hash = ('b' => 20); use Data::Dumper; say Dumper(\%hash); --output:-- $VAR1 = { 'b' => 20 };
Compare to:

use strict; use warnings; use 5.012; my %hash; $hash{a} = 10; $hash{b} = 20; use Data::Dumper; say Dumper(\%hash); --output:-- $VAR1 = { 'a' => 10, 'b' => 20 };
The real values I used instead of 'a' and 'b' are proprietary information, but hopefully you get the idea.


Comment on Re: Hash of Hashes not filling - only using last line of file
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2014-08-02 03:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (54 votes), past polls