good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Perl 5.8 to 5.16 and HASH errorby robsgoingmad (Initiate) |
on Sep 10, 2012 at 18:52 UTC ( [id://992824]=perlquestion: print w/replies, xml ) | Need Help?? |
robsgoingmad has asked for the wisdom of the Perl Monks concerning the following question:
Hi
I have at least 3 challenges 1. My knowledge of perl is growing but not good, developing for 25+ years in a variety of other languages 2. I have been presented someone elses code to work on 3. Due to a new server I have had to upgrade perl from 5.8 to 5.16.0. Should be irrelevant but perl code runs and tests ok on 5.8, but not on 5.16 Below are code snippets. The code is passed xml, parses the data and then uses mysql to update a DB with the data. Tag keys are field names, Tag values are the data values.
I am getting a "Not a HASH reference at ....pl line xx" error, generated by the foreach line above. From documentation I have found there seems to be a change from perl 5.8 to 5.16 with regards to HASH and the foreach. Does the change mean that code needs to change or is that a "red herring"? $Xml->data contains a number of xml tags and data values. perl is running on Linux Centos. Would appreciate any advice
Back to
Seekers of Perl Wisdom
|
|