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