Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: hashes hash refs and arrays

by aitap (Deacon)
on Sep 12, 2012 at 20:45 UTC ( #993309=note: print w/ replies, xml ) Need Help??


in reply to hashes hash refs and arrays

$share_hash{$fields[$colhash{res_stay_id}]} = [@fields];
This fills the %share_hash hash.
foreach my $share_item (keys %$share_hash) { my $row = $share_hash->{$share_item};
This tries to work with $share_hash scalar variable (which is different from %share_hash) as a hash reference and should probably trow some errors/warnings.
Use keys %share_hash and $share_hash{$share_item} instead.
Sorry if my advice was wrong.


Comment on Re: hashes hash refs and arrays
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://993309]
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-12-21 14:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls