Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Creating members of hash of hashes parallelly

by japhy (Canon)
on Jan 07, 2007 at 02:09 UTC ( #593362=note: print w/ replies, xml ) Need Help??


in reply to Creating members of hash of hashes parallelly

You don't want a hash in that middle level, then, you want an array: $db_hash{$path}[$idx]{$key}. To do that, you'd do:

while (<>) { my ($path, $start, $end, $delay) = split; # or however you get them push @{ $db_hash{$path} }, { START => $start, END => $end, DELAY => $delay, }; }

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart


Comment on Re: Creating members of hash of hashes parallelly
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2014-09-24 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (246 votes), past polls