Connecting Tech Pros Worldwide Forums | Help | Site Map

Comparing two files

Newbie
 
Join Date: Aug 2007
Location: chennai
Posts: 6
#1: Aug 7 '07
How can i Compare the lines of two different file.

savanm's Avatar
Member
 
Join Date: Oct 2006
Location: chennai
Posts: 86
#2: Aug 7 '07

re: Comparing two files


Hi G.Uma Maheshwari

Try this This is the basic idea of Comparing two files...

Expand|Select|Wrap|Line Numbers
  1. use File::Compare;
  2.  
  3. if (compare("xmlwrite.pl","1xmlwrite.pl") == 0) {
  4.     print "They're equal\n";
  5. }
  6.  
Regards.
Navas.M
numberwhun's Avatar
Site Moderator
 
Join Date: May 2007
Location: New Hampshire
Posts: 2,571
#3: Aug 7 '07

re: Comparing two files


In addition, please be sure and post the code that you have tried already. This is not a script writing service. We want you to learn and that won't happen if we write it for you.

Regards,

Jeff
Reply