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