in reply to How to split file for threading?

for my $line (<INFILE>) {

Have you tried actually running this code on a 20GB file?

Do you remember the responses to your previous question?

Replies are listed 'Best First'.
Re^2: How to split file for threading?
by diyaz (Beadle) on Jun 23, 2015 at 14:47 UTC
    It doesn't take hours only maybe 10-15 minutes. I was thinking this would be an easy example of learning threading. I did see the previous posts. Are you implying I should use Bio::Seq to thread?

      No. Anonymonk is suggesting not using for() to read a file.

      Use while (my $line = <INFILE>){ ... instead.

        i see, but why is that better? Are they not equivalent? one slurps first then processes whereas while reads and process one at a time?