in reply to Autoflushing Laser printer

STDOUT->autoflush(1); makes STDOUT autoflush, not FH. $| = 1 make the currently selected file handle autoflush, which isn't FH in your snippet.

my $text = "Printing test...\n"; open FH, ">LPT1:"; select(*FH); $| = 1; # Turn on autoflush for FH select(*STDOUT); print FH "$text\n";