in reply to diff output; unix commands

If you can, use Text::Diff.
use Text::Diff; my $foo = Text::Diff::diff $file1, $file2, \%options;
%options include STYLE (unified, context or classic etc), OUTPUT and a couple others.

/prakash