Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^5: Adding row in a hash Help!!

by hbm (Hermit)
on Aug 20, 2012 at 03:52 UTC ( #988386=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Adding row in a hash Help!!
in thread Adding row in a hash Help!!

Ah, ok. Try these changes:

# no need for this loop: # for my $w_data (@$weather_data) { # push @data, $w_data; # } # Now add 'report_date' key and its value at the appropriate level. #push @data, $weather_data->[0]{'xml_api_reply'}{'weather'}{'report_da +te'} = { '-data' => $today #}; push @{$weather_data->[0]{'xml_api_reply'}{'weather'}{'report_date'}}, + { '-data' => $today }; # print Dumper(\@data); print Dumper(\$weather_data);


Comment on Re^5: Adding row in a hash Help!!
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-07-04 02:59 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 (57 votes), past polls