Most printers will still be available as the traditional DOS devices LPT1, 
LPT2, etc.  Just as in Unix, these are valid targets for file copy 
operations.  The printer needs to understand the file, however.  Luckily, 
most printers can handle ASCII text, so for simple text output, this is 
OK.  One caveat, make sure your file has a trailing form feed (or send one 
after copying the file).  Otherwise, you won't get your last page until the 
next document prints.

Alternatively, you might open LPT1: for append and write the contents of 
the file to the handle.  Same difference, I believe.

hth,
Charlie

At 10:39 PM 5/2/2002 -0400, Matthew Brooks wrote:
>Thankfully, I haven't had to tackle that beast myself.
>
>I did a quick search and came up with:
>
>http://perlprint.sourceforge.net/
>
>It looks to still be in beta, but who knows, it might help.
>
>Matthew
>
>
>----- Original Message -----
>From: "Greg London" <[EMAIL PROTECTED]>
>To: "mongers of perl" <[EMAIL PROTECTED]>
>Sent: Thursday, May 02, 2002 8:44 PM
>Subject: [Boston.pm] windows print
>
>
> > Anyone know how to print files
> > to the default printer in
> > Micro$oft Win98 from inside perl?
> >
> > lpr("hello world");
> >
> > Greg
> >
> >

Reply via email to