diff options
author | Guilhem Moulin <guilhem.moulin@chalmers.se> | 2010-09-26 21:29:13 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem.moulin@chalmers.se> | 2010-09-26 21:29:13 +0200 |
commit | 14c3f3400cd81ac1cc95d87072aebca1e18c28c0 (patch) | |
tree | 0acbcc11fb18b72a9902a21a3e8a67638c961671 | |
parent | dac0f3cb8b9cd374295ab9c814ee4f9d72a1293b (diff) |
... or die "Can't close: $\!'"
-rwxr-xr-x | pdftool.pl | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -213,9 +213,6 @@ open *FIN, "<&READ" or die "Can't dup: $!"; # Auxiliary files, to remove my @auxfiles; -# Auxiliary file descriptors, to close -my @auxfds; - # Pids, to waid for my @pids; @@ -252,7 +249,7 @@ if ($filetype eq "PDF") { my @pair = ($pid, @cmd); push @pids, \@pair; } else { - *PSIN = *FIN; + open *PSIN, "<&FIN" or die "Can't dup: $!"; } @@ -345,11 +342,8 @@ map { my ($pid, @cmd) = @$_; } @pids; -# Close auxiliary filehandles -map {close} @auxfds; -close READ or die "Can't close: $!"; -close FIN or die "Can't close: $!"; -close FOUT or die "Can't close: $!"; +map { close $_ or die "Can't close: $!" } + ( *READ, *FIN, *FOUT ); # Delete auxiliary files |