gzayzay has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to work on a project in wish I compare to files to determine their difference. However, I am have problem performing this task. What I want to do is to give the name of two text file that I almost identical to my program. Let the program open the two files and compare them to see if they are different. Example;
Given to two sample files above, you will observe that "dummy" in file2 is what cause the two files to be different. By using dummy next to smoking, this implies that I know longer want to use "smoke" as a sequence of LIFE. My problem is that, instead of getting ride of smoke completely, I want to concatenate dummy with smoke i.e (dummy smoke smoking) in File2. Note that every definition starts with ::= and ends with a curely brace.__FILE1__ Life ::= SEQUENCE{ eat eating drink drinking smoke smoking run CHOICE { fast faster slow slower } } Dave :: = CHOICE { club clubing bat batting } __FILE2__ Life ::= SEQUENCE{ eat eating drink drinking dummy smoking run CHOICE { fast faster slow slower } } Dave ::= CHOICE { club clubing bat batting }
Could any monk kindly help me figure out how to do the files comparison and replacement?
Thanks for your assistance.
Edman
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Comparing two files
by philcrow (Priest) on Jun 13, 2006 at 13:27 UTC | |
|
Re: Comparing two files
by jesuashok (Curate) on Jun 13, 2006 at 12:55 UTC |