Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

How to print to a printer

by Anonymous Monk
on Aug 15, 2002 at 11:19 UTC ( [id://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.

Alex.

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.

    Abigail

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-24 02:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found