Glad you found your answer - but I thought I'd mention that XML::DOM is not a great tool for dealing with very large XML files.
XML::SAX is a better fit - it's supports streaming parsers (like
XML::SAX::ExpatXS) which means they doesn't build a tree structure in memory. Depending on your task this can mean your app runs faster and uses far less memory. Used correctly an XML::SAX handler should be able to process arbitrarily large XML files.
-sam