RICHARD A. NAKROSHIS (Contractor) writes ..
>I hate to ask dumb questions, but how do you print directly to the
>default Windows printer? I've tried using a batch file to call my
>ActivePerl 5.6 perl script, writing my output to a file, and then
>printing that file, but the perl script doesn't finish before the
>program attempts to print the file.
>
>Is there a way to send something direct to the printer?
this doesn't print to the 'default' printer (don't know how to find the
default printer) .. but assuming that your printer is a local printer on
LPT1 .. then the following will print to it
open PRINTER, 'lpt1:' or die "Bad open: $!";
print PRINTER "stuff\n";
close PRINTER or die "Bad close: $!";
--
jason king
By South Carolina state law, if a man promises to marry an unmarried
woman, the marriage must take place. - http://dumblaws.com/