Perl Programming/Keywords/print

The print keyword
print prints a string or a list of strings and returns true, if successful. The parametre FILEHANDLE may be a scalar variable with a reference to the file handle. This introduces a level indirection for the print.

If FILEHANDLE is a variable followed term, it may be misinterpretedby the system as an operator unless a + is added inbetween, or all arguments are put in parentheses. Without the FILEHANDLE, the last selected output handle is used. Without LIST, the function prints <tt>$_</tt> to the current output handle.

To use <tt>FILEHANDLE</tt> and use the <tt>$_</tt>, a real filehandle like <tt>FH</tt> and not an indirect filehandle like <tt>$fh</tt> is required.

Examples
The code