Strange... It works just fine for me. But I have some comments:
- You should use while(<>), not for(<>). The latter reads
the whole file into memory first, which you say (rightly) that you don't want to do.
- Are you really wanting to process an XML file? If so, then this is a
pretty bad way to do it. XML::Simple and several others are readily available, and will Do The Right Thing without you having to think twice about it.
use XML::Simple;
my $ds = XMLin "664168.xml";
use Data::Dumper;
print Dumper $ds;
A word spoken in Mind will reach its own level, in the objective world, by its own wei
ght