more useful options | |
PerlMonks |
perlfunc:printby gods (Initiate) |
on Aug 24, 1999 at 22:43 UTC ( [id://349]=perlfunc: print w/replies, xml ) | Need Help?? |
See the current Perl documentation for print. Here is our local, out-dated (pre-5.6) version: print - output a list to a filehandle
print FILEHANDLE LIST print LIST
Prints a string or a comma-separated list of strings. Returns
TRUE if successful.
FILEHANDLE may be a scalar variable name, in which case the variable contains the name of or a reference to the filehandle, thus introducing one level of indirection.
(NOTE: If
FILEHANDLE is a variable and the next token is a term, it may be misinterpreted as an operator unless you interpose a
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"; |
|