print LIST
$_
to
STDOUT. To set the default output channel to something other than
STDOUT use the select operation. Note that, because print takes a
LIST, anything in the
LIST is evaluated in a list context, and any subroutine that you call will have one or more of its expressions evaluated in a list context. Also be careful not to follow the print keyword with a left parenthesis unless you want the corresponding right parenthesis to terminate the arguments to the print--interpose a + or put parentheses around all the arguments.
Note that if you're storing FILEHANDLES in an array or other expression, you will have to use a block returning its value instead:
print { $files[$i] } "stuff\n"; print { $OK ? STDOUT : STDERR } "stuff\n";