I can think of a couple of ways, one I've tried, one I haven't (yet...

.<br>
<br>
First method...<br>
<FONT FACE=monospace><br>
open (MYFILE, ">/tmp/myfile.txt"

;<br>
.<br>
... Do some perl stuff writing to MYFILE.<br>
.<br>
close(MYFILE);<br>
system("lp -dmyprinter /tmp/myfile.txt"

;<br>
unlink("/tmp/myfile.txt"

;<br>
</font><br>
Second method, that you suggested, which I haven't tried yet, but that should work a treat...<br>
<FONT FACE=monospace><br>
# Use -s to silence lp.<br>
open(MYPRINTER, "¦ lp -s -dmyprinter"

;<br>
<br>
.<br>
... do some perl stuff writing to MYPRINTER.<br>
.<br>
<br>
# If this works as I suspect, print job should start now...<br>
close(MYPRINTER);<br>
</font><br>
2nd way is a lot neater - wish I'd thought of it myself a long time ago!

<br>
<br>
OK, I'm off to try this now - I'll let you know how I get on