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

Monks,

Question: Can I trigger a printout of a hardcopy, text or so, from perl, without the script-hosting system (in this case Linux) asking for a confirmation, a print-dialog or similar?

Answered it myself:
open(PRN, "|lp"); print PRN "hello";
(Note to myself: research first, ask later...). As I already wrote the post, left here in case anyone else comes up with this.

Replies are listed 'Best First'.
Re: Solved: Can I trigger a hardcopy (printer print) from perl?
by isync (Hermit) on Jan 09, 2012 at 15:05 UTC
    Related reading: Net::Printer, Net::LPR, Net::CUPS etc. on cpan.
    Or use from perl what the system exposes, for example system("lpr some.pdf").
Re: Solved: Can I trigger a hardcopy (printer print) from perl?
by mrdurtal (Scribe) on Jan 10, 2012 at 12:33 UTC
    Would there not be something like:
    open(PRN, "|lp") or &dienice("Can't print: $!\n"); print PRN "hello";

    :There is more than one way to @verb a cat: