in reply to Re^6: how to check if a particular value exist in list of files stored in an array
in thread how to check if a particular value exist in list of files stored in an array
I would expect that checking several 100 GBytes takes some time...
Update: If you store the information of your condition file already as "field1,field2" => 1, ie in the same format that you encounter in your large files you can rewrite it as:
foreach my $file_name (@array) { open FILE, "$file_name" or die "File not exists"; while ( <FILE> ) { print OUTPUT $_ if /^(.*?,.*?),/ and exists $records{$1}; } }
Maybe this is faster...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: how to check if a particular value exist in list of files stored in an array
by Perlseeker_1 (Acolyte) on Oct 30, 2013 at 11:04 UTC | |
by Corion (Patriarch) on Oct 30, 2013 at 11:12 UTC | |
by Perlseeker_1 (Acolyte) on Oct 30, 2013 at 17:28 UTC |