in reply to Printing to Win2K3 server

You could store them in a file and execute the 'print' Win32 command. Assuming that @text contains the text to be printed:
foreach (@text){ open(FILE,">file.txt"); print FILE $_; close(FILE); print `print file.txt`; };
There you go. This might open security holes, but that may or may not matter much considering that it's a test script. You may also want to put a sleep() in there to avoid problems. 10 seconds or so would probably be enough.

Replies are listed 'Best First'.
Re^2: Printing to Win2K3 server
by rhymejerky (Beadle) on Jul 21, 2004 at 23:39 UTC
    I don't quite understand this. So, do I use the Win32::Printer module for this task? I can do a loop to print, but just not sure what command to use for printing. Thanks