Home: Perl Programming Help: Beginner:
Process XML files

New User

Nov 13, 2012, 6:02 AM

Views: 3666
Process XML files


I try to process XML files using XML::Simple. I read the file using XMLin and immediately write it out with XMLout, without any processing.

The destination file is created but the it saved in a different order. Is it possible to keep the order of the original file.



(This post was edited by Shai on Nov 13, 2012, 7:18 AM)

Veteran / Moderator

Nov 13, 2012, 9:59 AM

Views: 3657
Re: [Shai] Process XML files

If you juste want to copy the file without any processing, don't use the module, simply copy the lin es one by one.

The module you are using is using hash structures to store your data, and a hash is not keeping the order of its elements, so they will appear in apparently random order.