Comparison of two files which contains strings using Shell scripting or PERL

Hi,
I need sample code to compare the two files line by line which contains text strings and to print the difference in the third file.

Thanks in advance

check out diff, comm and even grep utilities..