in reply to Re^5: search a large text file
in thread search a large text file
for example when I search for a key, I'll get the correct value few times instead of for example one or two times!sub to_hash { my $file = shift; my $db = DBM::Deep->new( "$file.db" ); open(FILE, "<$file"); foreach $l (<FILE>) { my ($ngram,$line) = split /\t/, $l; push(@{ $db->{$ngram} }, $line); } close FILE; return $db; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: search a large text file
by jethro (Monsignor) on Feb 10, 2011 at 10:16 UTC | |
by perl_lover_always (Acolyte) on Feb 10, 2011 at 10:25 UTC | |
by jethro (Monsignor) on Feb 10, 2011 at 10:45 UTC | |
by perl_lover_always (Acolyte) on Feb 10, 2011 at 13:47 UTC | |
by jethro (Monsignor) on Feb 10, 2011 at 15:37 UTC |