开发者

file compare in perl

开发者 https://www.devze.com 2023-03-02 09:42 出处:网络
I am new to perl . I have two text files: file1 contain two lines: mahesh bharti file2 contain two lines: mahesh

I am new to perl .

I have two text files:

file1 contain two lines:

mahesh
bharti

file2 contain two lines:

mahesh
orange

as you can see difference between two files is bha开发者_C百科rti and orange. Somehow i am able to print the difference. But my requirement is it should print as below.

Difference of file as below:
File1 contain: bharti
FIle2 contain: orange

my current code written in perl as below


Use the Text::Diff module.

0

精彩评论

暂无评论...
验证码 换一张
取 消