Next Welcome to my ~/bin 120

imgdiff

        run("pnmarith $diff @pnm > $tmp");
        run("xv $tmp");
        run("rm -f $tmp @pnm") unless $LEAVE_TMP_FILES;
        sub run {
          my $cmd = shift;
          print $cmd, "\n";
          my $context = wantarray;
          my $result;
          if (defined $context) {
            $result = qx{$cmd};
          } else {
            system($cmd);
          }
          if ($? != 0) { warn "-- command exist status was $?\n" }
          $result;
        }


Next Menu Copyright © 2005 M. J. Dominus