Date: 13 Sep 2001 02:40:07 GMT From: damian@qimr.edu.au (Damian James) Subject: Re: Printing in Perl Message-Id: Graham W. Boyes - TOAO.net chose Thu, 13 Sep 2001 01:06:22 GMT to say this: >I'm using a Windows 98 boot disk that networks to a printer on a Windows >2000 Professional machine. I'm using the latest version of the DJGPP MS-DOS >port. The printer is connected via parallel to the Win2K Machine. I open >LPT1 like a file and print to it, but the printer won't print the data until >I hit the OK button on the printer. What happens if you type the following from the command prompt: echo test > lpt1: or type filename > lpt1: What are you actually doing, opening a filehandle to LPT1? Maybe the problem is buffering (enable autoflush by setting $| to 1, and look in perlvar). Otherwise, you have enough information to do this with system() and temporary files. Cheers, Damian -- @:=grep!(m!$/|#!..$|),split//,;@;=0..$#:;while($:=@;){$;=rand $:--,@;[$;,$:]=@;[$:,$;]while$:;push@|,shift@;if$;[0]==@|;select$,, $,,$,,1/80;print qq x\bxx((@;+@|)*$|++),@:[@|,@;],!@;&&$/} __END__ Just another Perl Hacker,# damian@qimr.edu.au