perl -e'open(FL,"primes.txt");$. == 10000 && ($line = $_) while <FL>;print("$line\n");'
it takes < 1 sec. to find the 10,000th line and uses very few memory.
In reply to Re: Fast way to read from file
by Taulmarill
in thread Fast way to read from file
by Hena
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |