Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 exploiting the Monastery: (19)
As of 2015-07-07 15: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 (90 votes), past polls