Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Printing to a Printer (Win98)

by zdog (Priest)
on Jul 27, 2000 at 23:30 UTC ( [id://24739]=perlquestion: print w/replies, xml ) Need Help??

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

I need to print to a printer from a perl script running on ActivePerl on a Win98 system. chromatic said here that on a UNIX system it was enough to "open a pipe to lpr". Can I also do that on WIndows? If so, how do you "open a pipe to lpr"? If not, do you know of any module that I can use that would allow me to do that?


Zenon Zabinski | zdog |

Replies are listed 'Best First'.
Re: Printing to a Win98 Printer (Win32, Win32API)
by ybiC (Prior) on Jul 28, 2000 at 01:31 UTC
Re: Printing to a Printer (Win98)
by tye (Sage) on Jul 28, 2000 at 07:29 UTC

    One of:

    open(PRINTER,">prn") or die "Can't write to aux: $!\n"; open(PRINTER,">lpt1") or die "Can't write to lpt1: $!\n";

    should let you write text to be printed. But I know almost nothing about this.

      Thanks a lot. It gets the job done to a certain extent, but it still needs to have a few kinks worked out. But it gives me a great start, thanks.

      Zenon Zabinski | zdog |

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-12 23:07 GMT
Find Nodes?
    Voting Booth?

    No recent polls found