> +if ($inline && $diff ne "-") {
> +     $tmp = `mktemp`;
> +     if ($? != 0) {
> +             die "Could not generate temp file";
> +     }
> 
> IMHO better use consistent style: system() or ticks with $?.

Or let Perl itself create the temporary file:

        open(my $tmp_fh, "+>", undef) or die "cannot create temp file: $!";

or something.  Or use File::Temp if you have to.


Segher

Reply via email to