1. see File::Compare - Compare files or filehandles
2. Or you can try something like,my %data_hash; open(my $fh, '<', "datafile.txt") or die $!; while(<$fh>){ $data_hash{$_} = 1; } close($fh); open(my $fh1, '<', "tmpfile.txt") or die $!; while(<fh1>){ if(defined($data_hash{$_})){ print"Line match"; }else{ print"Line not match"; } } close($fh2); close($fh1);
In reply to Re: File Compare
by Nikhil Jain
in thread File Compare
by Cicatrix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |