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

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
Replies are listed 'Best First'.
Re^2: Perl 5.8 to 5.16 and HASH error
by robsgoingmad (Initiate) on Sep 12, 2012 at 08:13 UTC


    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



Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2015-10-07 07:04 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (172 votes), past polls