in reply to Re: character-by-character in a huge file
in thread character-by-character in a huge file

I have to disagree; that code will execute about 14 ops per character (or about 42000000000 ops total); even the overhead of perl's op dispatch loop will be huge, much less the actual code of the ops themselves. Simulating just the basic overhead with perl -we'1 for 1..14000000000' (3 ops per loop iteration) runs about 36 minutes on my system; this is substantially longer than it would take to read through 3Gb.