Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Perl 5.8 to 5.16 and HASH error

by AnomalousMonk (Abbot)
on Sep 10, 2012 at 20:03 UTC ( #992842=note: print w/ replies, xml ) Need Help??


in reply to Perl 5.8 to 5.16 and HASH error

foreach $key (keys %{$Xml->{data}}){ ... }

In the quoted code,  $Xml is used as a hash reference. Further in your post, you say

$Xml->[data] contains a number of xml tags and data values.
Note the difference: curly versus square braces. (I am assuming you meant to write  $Xml->[data] in a code block because as it stands, it renders as a dead  <a> link.)

So which is it: a hash reference (curly braces) ofor an array reference (square braces)?


Comment on Re: Perl 5.8 to 5.16 and HASH error
Select or Download Code
Re^2: Perl 5.8 to 5.16 and HASH error
by robsgoingmad (Initiate) on Sep 12, 2012 at 08:13 UTC

    Hi

    Below is the data from $Xml using Dumper. I am not expecting to change any code. Code has moved from an old server to new server. Only differences are Linux version has changed from 2.6.24 to 2.6.18 and perl version has changed from 5.8.8 to 5.16.0

    At this point I am expecting all the code to remain as it is. It has been working for years. If you advise that "things have changed" then I will need to reconsider.

    I tried the code change you suggested and received a 500 Internal Server Error. Hope the above information helps

    Regards

    Rob

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-10-02 01:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (41 votes), past polls