in reply to Re^3: XML::Simple troubles
in thread XML::Simple troubles

Thanks once again but it is still not working.
I am running perl 5.8.8 and I am still getting errors.
The first time I ran it I had this:
[scotgaz@fleet tut]$ perl pmonks.pl Pseudo-hashes are deprecated at pmonks.pl line 8. Pseudo-hashes are deprecated at pmonks.pl line 8. Use of uninitialized value in printf at pmonks.pl line 9. LookAt is at Pseudo-hashes are deprecated at pmonks.pl line 9. Pseudo-hashes are deprecated at pmonks.pl line 9. Argument "#SGStyle" isn't numeric in each at pmonks.pl line 9. Bad index while coercing array into hash at pmonks.pl line 9.
and then every other time I ran it I got this error:
[scotgaz@fleet tut]$ perl pmonks.pl Pseudo-hashes are deprecated at pmonks.pl line 8. Pseudo-hashes are deprecated at pmonks.pl line 8. Out of memory!
I spoke to a colleague who could only suggest that any HTML encoding within the XML could cause problems although both of us think otherwise.
The outpu you included is exactly the response I need!

Cheers,
Niall

Replies are listed 'Best First'.
Re^5: XML::Simple troubles
by moritz (Cardinal) on May 26, 2008 at 12:29 UTC
    Argument "#SGStyle" isn't numeric in each at pmonks.pl line 9.
    I find this particularly puzzling, because Line 9 doesn't try to use anything as a number, and there is no 'SGStyle' in the XML input file you pasted.

    So either your system is totally broken, or you are running the script with different code or data than I do.

    The Pseudo-hashes are deprecated suggests that the data structure is an array and you try to use it as a hash.

      My guess is that the OP is using a different data file than the one posted and that the solution likely is to use the ForceArray => [...] option as discussed in XML::Simple.