Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Memory utilization and hashes

by BrowserUk (Patriarch)
on Jan 17, 2018 at 21:38 UTC ( [id://1207434]=note: print w/replies, xml ) Need Help??


in reply to Memory utilization and hashes

Your posted code will not run. You have an error in a variable name here: chomp $;. You have unbalanced [] here:%pairs{$l[1}{$l[2]} = $l[3];. And hash element references should start with $ not %.

In addition, you assign $_ to $l, use it as a scalar: @vals = split /;/, $l;, and then index it as an array:%pairs{$l[1]}{$l[2]} = $l[3];

Use strict; use warnings; Only post code that compiles.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found