Next Welcome to my ~/bin 111

print: Conversion

 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;
 }


Next Menu Copyright © 2005 M. J. Dominus

AltStyle によって変換されたページ (->オリジナル) /