Next Welcome to my ~/bin 103

print: Spooling files

        sub spool {
          if ($opt_s) {
            warn "(Not) spooling file\n" if $opt_v;
            return;
          }
          my $file = shift;
          my $spoolfile = make_spool_file_name();
          my $dotfile = $spoolfile;
          unless (copy($file, "$CONF{spooldir}/$dotfile")) {
            die "Sorry, couldn't spool $file: $!; aborting";
          }

          unless (rename "$CONF{spooldir}/$dotfile",  
                         "$CONF{spooldir}/$spoolfile.$CONF{printable}") {
            die "Sorry, couldn't finish spooling $file: $!; aborting";
          }
          run_printd();
        }



Next Menu Copyright © 2005 M. J. Dominus