Sounds like homework not a genuine work query.

On Thu, 2008-03-20 at 15:14 +0530, [EMAIL PROTECTED] wrote:
> Hi All,
> 
> Can somebody please help me on this???
> 
> Regards,
> Irfan
> 
> 
> -----Original Message-----
> From: Sayed, Irfan 
> Sent: Monday, March 17, 2008 7:52 PM
> To: beginners@perl.org
> Subject: diff of two files
> 
> Hi All,
> 
>  
> 
> I want to compare the two files in Perl. The requirement is that file 1
> has 20 lines and file2 has 25 lines . I want to see only five lines as
> output which are there in file2 not in file1 as I know that rest of the
> 20 lines are same in both the files.
> 
> I am using the following commands 
> 
>  
> 
> Diff /tmp/dev_path_PRS.DB.01.12.000 /tmp/dep_path_D.PRS.DB.01.12.000.8
> 
>  
> 
> As per my understating I should get 5 lines as output
> 
>  
> 
> Could you please help in getting exact result.
> 
>  
> 
> Please help
> 
>  
> 
> Regards,
> 
> Irfan
> 

Here is a micro spec,  if you show your perl code you might get help.

If you want unique lines simply sort the two input files and read them
together.  if the records match then read another pair,  if they don't
then output the lesser value of the two,  read appropriate file and
retry.

Good luck
Ken


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


Reply via email to