Your example shows differences on a single line, but your question asks about differences in a file. These will require different solutions, but maybe you are looking for a solution that handles both.
Like another has suggested, I would look at POSIX's comm, and then perhaps run the results from that through String::Diff.
In reply to Re: Comparing the contents of two files
by onelesd
in thread Comparing the contents of two files
by archer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |