Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

How to print to a printer

by Anonymous Monk
on Aug 15, 2002 at 11:19 UTC ( #190363=perlquestion: print w/replies, xml ) Need Help??

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

I have the following shell code that i would like a perl translation
(platform independant) for, as the program is to be used on either *nix or NT.
I have looked in a couple of books that I have available but found nothing.

lp -c -d$Device $File

Any help from you wisest of perlographers would be kindly appreciated.


Replies are listed 'Best First'.
Re: How to print to a printer
by dree (Monsignor) on Aug 15, 2002 at 12:21 UTC
    There is a module on CPAN: Printer by Stephen Patterson that tries to give a common interface to the various printer methods.
    It embeds the OS dependent ways to print and it wraps them.
Re: How to print to a printer
by Abigail-II (Bishop) on Aug 15, 2002 at 11:43 UTC
    That cannot be done platform independent. On UNIX, using lp or lpr is the most platform independent way you can get (some OSses offer both lp and lpr. But one is BSD, the other System V), but options may vary.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://190363]
Approved by Courage
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2019-07-19 10:38 GMT
Find Nodes?
    Voting Booth?

    No recent polls found