You asked about read and sysread already, so you know about other ways.
There are two possibilities: either the parsing code is too slow (you can find that out by profiling, as was previously suggested to you), or it's really the IO that's slow. If that's the case, using a different method to read the file won't speed it up significantly. All you can do is obtaining a faster system.
Update: on my system it takes about 3.2 seconds to read 1GB with an ordinary while (<$handle>) loop, and about 1.4 seconds to read it with sysread. (The file might be still in the IO buffers of my operating system). So maybe it's really your parsing code that's being slow, not the IO?
See also: reading file. Repeating your questions (and phrasing them slightly different) won't help you at all.
In reply to Re: read huge file
by moritz
in thread read huge file
by saranperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |