How about your two files?I should give a general way for comparing two
files:

use strict;

open TXT1, "1.txt" or die "$!";
open TXT2, "2.txt" or die "$!";
my %diff;

$diff{$_}=1 while (<TXT2>);

while(<TXT1>){
  print unless $diff{$_};
}

close TXT2;
close TXT1;


As you see,use a hash to store the second file's lines,then open the
first file,and compare each line in first file to the hash,you could get
the correct results.

On Wed, 14 Jun 2006 13:38:23 +0530, "Preethi" <[EMAIL PROTECTED]> said:
> Hi All,
> 
> I'm a newbie in Perl. I was try to achive to diff two files using perl on
> windows.
> 
> Please suggest me how should I do this!
> 
> Thanks,
> Preethi
-- 
  Jeff Peng
  [EMAIL PROTECTED]

-- 
http://www.fastmail.fm - Choose from over 50 domains or use your own


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to