Next | Welcome to my ~/bin | 111 |
The actual conversion is done by convert:
sub convert { my ($input, $new_type, $command) = @_; my $output = tempfile($new_type); local (*R, *W, *F);
subst($command, 'I', $input); subst($command, 'O', $output);
warn "*** Running command $command\n" if $opt_v; unless (system($command) == 0) { exit $? if $? & 255; # catch signals warn "command returned failure status $?; skipping"; return; }
push @TMPFILES, $output; return $output; }
subst replaces %I and %O with the names of the input and output files
Next | Menu | Copyright © 2005 M. J. Dominus |