Jose,
    try:
$ perl -e '
my $delta;
$delta = `diff ae.txt ae.txt`;
print $delta."\n";
unless ($delta) {
print"they are identical\n";
}'
HTH
"Jose Torres" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> If I'm calling the diff program from within a Perl script with something
> like:
>
> system("diff file1.txt file2.txt");
>
> how can I detect if there is a result or not, since if the files are
> identical, diff
> doesn't have any output? I need to be able to be able to determine if
there
> was any output from within my script so that I can take one particular
> action if diff
> returned something (the files were different) or take another if diff
didn't
> return anything (the files were identical). Thanks for all help with this.
>
>
> -Jose



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to