Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have a perl script that generates a plaintext "report" that, up to now, I have been saving to a file on a Debian/GNU server. The thing is, I'd like to, rather than save it to disk, print it to a shared printer on a Windows workgroup.

Ideally, I'd like to print to an HP PSC 1200, shared from a Windows workstation via a USB connection. If that proves too difficult, I could print to a Konica Minolta Bizhub C350 that supports LPR and has a static IP address.

The truth is, though, I don't even know where to start. I assumed I'd have to find a SAMBA-capable module to use this shared windows printer, but I couldnt find anything on CPAN (to be honest im not even sure what i'm *looking* for).

If anyone could help me out, or at least point me in the right direction, i would greatly appreciate it.
  • Comment on sending text docs to a network printer from a linux server via perl?

Replies are listed 'Best First'.
Re: sending text docs to a network printer from a linux server via perl?
by saintmike (Vicar) on Oct 04, 2005 at 21:37 UTC
    You don't need Perl to print a document from a Debian box on a network printer.

    All it takes is setting up the Linux box for printing.

      ah. then if i set it up on the linux box itself, how would i then print the file from my perl app? just through a system call?
Re: sending text docs to a network printer from a linux server via perl?
by traveler (Parson) on Oct 04, 2005 at 22:19 UTC
    If you look on CPAN for lpr, you'll find Net::LPR that does the LPR printing. It has a text file printing example and everything.