Thanks for the replies and suggestions. Yes it is strange, the system now has 12 gigs of memory. My own workstation has 16 gigs and I'm not getting the out of memory error running the same script. Anyway.
So it's probably a dumb question, but do I even need Text::CSV for your suggestion? Couldn't the script just put $n lines of text into an array and feed those to @arr_of_data? And how would I do $csv_obj->print_xml("out.xml") at each iteration without clobbering the previous iteration? (ok, you can tell I'm still learning here - begging patience...)
Thanks.