http://www.perlmonks.org?node_id=608281


in reply to Out of memory error while Reading 5GB text file

where is $sword set? From that fragment, it looks like you're not chomp()ing anything.

How can you feel when you're made of steel? I am made of steel. I am the Robot Tourist.
Robot Tourist, by Ten Benson