diff options
-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 |