You need to read the output file, and separate it into the parts (lines?
strings? keywords?) that you are working with.
Then you need to store those parts, so that you can tell which ones are
there and which aren't.  A hash is probably the best way to store those
items.
Then you need to read the input file, separate it into similar parts,
and check whether all of those parts exist in the output file.
If not, then you need to merge the input file into the output file,
somehow.

I'm sorry that my advice is so vague, but your description of what you
need is very vague.


Eric 

 
-----Original Message-----
From: Beri Veera-ext, Reddy [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 26, 2007 10:15 AM
To: Roode, Eric; ActivePerl
Subject: RE: How to compare two files and update to second file

Hi,
 Thanks for your information. Output file has some additional data. 
 OUTPUT file should have INPUT FILE data but INPUT file need be have all
data of OUTPUT.

Thanks and Regards
Reddy  

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Roode,
Eric
Sent: 26 February 2007 16:08
To: ActivePerl
Subject: RE: How to compare two files and update to second file

Why compare?  Why not just copy the input to the output each time? 

Eric

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Beri
Veera-ext, Reddy
Sent: Monday, February 26, 2007 10:05 AM
To: Brian Raven; ActivePerl
Subject: RE: How to compare two files and update to second file

Hi,
I am using Perl. 
   I have to compare INPUT text file  and OUTPUT text file.
   If OUTPUT file is not have some text which is there in INPUT file. I
need to write that text to OUTPUT file. 
Ex:
 INPUT file has (CADITEM, BSHITEM, ToolItem )  OUTPUT file has (CADITEM,
ToolItem)
  I need to compare to files and write BSHITEM to OUTPUT file.
My problem: I am not able read two file at same time. I am getting only
from one file.

Please help me how to read two files and compare.

Thanks and Regards
Karunakara Reddy
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to