in reply to Comparing Large Files
(see also 36725)perl -MDigest::MD5 -ne "print if ($seen{&Digest::MD5::md5_hex($_)}.= @ +ARGV) =~ /10$/" fileA.txt fileB.txt > output.txt
</FUN>
If the files are too big to fit into memory, but you want to deal with the lines as if they were arrays, you could have a look at Tie::File:
for more details, see perldoc Tie::File, just beware that changes in such a tied array are also done in the tied file.use Tie::File; my @content; tie (@content, 'Tie::File', $file) or die "Error: couldn't tie $file: $!\n"; # .... and treat the filecontent like an array, e.g. print scalar(@content); # ..... untie (@content);
Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"
|
|---|