diff options
author | Guilhem Moulin <guilhem.moulin@chalmers.se> | 2010-09-26 21:13:38 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem.moulin@chalmers.se> | 2010-09-26 21:13:50 +0200 |
commit | 6a0d7128b39b2577e82a9fe0d4472b5bc2be85ec (patch) | |
tree | 7fdda98e4be2e781aea01f15df674a97390041e1 | |
parent | 0d5d0f3019746e765e8a0fc418c6687b41001bee (diff) |
... or die "Can't print: $!"
-rwxr-xr-x | psresize2.pl | 10 |
1 files 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 = <FIN>)) { - 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 (<FIN>) { - print WRITE; + print WRITE or die "Can't close: $!"; } exit; } |