From 6a0d7128b39b2577e82a9fe0d4472b5bc2be85ec Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 26 Sep 2010 21:13:38 +0200 Subject: ... or die "Can't print: $!" --- psresize2.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/psresize2.pl b/psresize2.pl index 0a0910d..ba92bf0 100755 --- a/psresize2.pl +++ b/psresize2.pl @@ -263,15 +263,15 @@ if (defined $crop) { my $s = "[" . ++$p . "] "; $c += length $s; if ($c >= 80) { - print LOG "\n"; + print LOG "\n" or die "Can't close: $!"; $c = length $s; } - print LOG $s; + print LOG $s or die "Can't close: $!"; } } } close GSOUT or die "Can't close: $!";; - print LOG "\n" unless defined $quiet; + print LOG "\n" or die "Can't close: $!" unless defined $quiet; # No zombie processes waitpid $pid, 0; @@ -293,7 +293,7 @@ if (defined $crop) { pipe *READ, *WRITE or die "Can't pipe: $!"; while (not (@bbox) && defined (my $l = )) { - print WRITE $l; + print WRITE $l or die "Can't close: $!"; @bbox = ($1, $2, $3, $4) if ($l =~ m/^\%\%BoundingBox: (\d+) (\d+) (\d+) (\d+)/); } @@ -306,7 +306,7 @@ if (defined $crop) { close READ or die "Can't close: $!";; while () { - print WRITE; + print WRITE or die "Can't close: $!"; } exit; } -- cgit v1.2.3