in reply to Large file problem

Just change your 'for' to 'while'
while (<IN>) {
HTH

Sweetblood

Replies are listed 'Best First'.
Re^2: Large file problem
by Happy-the-monk (Canon) on Dec 01, 2004 at 17:34 UTC

    Just change your 'for' to 'while'

    ...because for would slurp your file into memory,
    whereas while only reads it line by line.

    It's mentioned in perldoc perlintro
    Update: bummer, it isn't mentioned there. And so certain was I...

    Cheers, Sören

Re^2: Large file problem
by JohnBrook (Acolyte) on Dec 01, 2004 at 17:36 UTC
    DOH! Sorry. Works fine. Forget I asked! :-)

    (One of those things it takes someone else to see...)