From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/2784 Path: main.gmane.org!not-for-mail From: Ed L Cashin Newsgroups: gmane.comp.tex.context Subject: Re: pdftops Date: 21 Sep 2000 10:38:36 -0400 Sender: owner-ntg-context@let.uu.nl Message-ID: References: <3.0.6.32.20000921130033.0178d610@pop.wxs.nl> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035393557 11781 80.91.224.250 (23 Oct 2002 17:19:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:19:17 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: Hans Hagen In-Reply-To: Hans Hagen's message of "Thu, 21 Sep 2000 13:00:33 +0200" Xref: main.gmane.org gmane.comp.tex.context:2784 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:2784 Hans Hagen writes: > Hi, > > the perl line: > > system("pdftops") ; > > does not work any longer with the latest perl and pdftops. It does > work when the program is on the same path, but not otherwise. This > is strange, since pdfetex in the same binpath as pdftops does > work. Did they change perl? Yes, the latest version of perl is very different. Version 5.6 has some big differences, including new features that are incompatible with the old perl 5 (e.g., now "use vars" is obsolete because of the introduction of "our" variables). But I can't think of why the new perl would make that simple system call break. Looking at the entry for "system" in the perlfunc manpage, I see ... Beginning with v5.6.0, Perl will attempt to flush all files opened for output before any operation that may do a fork, but this may not be supported on some platforms (see the perlport manpage). To be safe, you may need to set `$|' ($AUTOFLUSH in English) or call the `autoflush()' method of `IO::Handle' on any open handles. But I don't know if that's relevant. Maybe try some error checking: { #-----------this command makes a log file on UNIX-type OS my $cmd = "pdftops foo bar 1> /tmp/test.log 2>&1"; my $err = system($cmd); if ($err == -1) { die "Error: could not start pdftops: $!"; } elsif ($err) { $err /= 256; # find real exit status die "Error: pdftops returned error status: $err"; } print "Oh, happy day!\n"; } -- --Ed Cashin PGP public key: ecashin@coe.uga.edu http://www.coe.uga.edu/~ecashin/pgp/