Thread 80 Mio Zeilen einlesen (24 answers)
Opened by FanClub at 2013-07-16 10:17

hlubenow
 2014-02-06 16:15
#173425 #173425
User since
2009-02-22
875 articles
BenutzerIn
[default_avatar]
Ist ja lustig, daß noch keiner auf Tie::File hingewiesen hat:
Code (perl): (dl )
1
2
3
4
5
6
7
8
#!/usr/bin/perl
use warnings;
use strict;

use Tie::File;
my @array;
tie(@array, 'Tie::File', "file.txt") or die;
print "$array[13]\n";

Danach hast Du das also bequem in einem Array.
Quote
The file is not loaded into memory, so this will work even for gigantic files.

View full thread 80 Mio Zeilen einlesen