in reply to $_ as default printf arg fails
I think kcott is on the right track, it's a documentation error.
In If you omit the LIST, $_ is used; to use FILEHANDLE without a LIST, you must use a real filehandle like FH , not an indirect one like $fh
LIST is meant to describe the ARGUMENTS ( i.e. FORMAT, VALUES) to the function (or method i.e. FILEHANDLE->printf(ARGUMENTS) ), like you can see in the following example
DB<100> $_=42 => 42 DB<101> printf 42 DB<102> printf STDOUT 42
(tested with 5.10 which didn't even document the use of $_)
So LIST should be replaced with "ARGUMENTS" in the quoted part.
IMHO the other occurrences of LIST should be replaced with "VALUES".
that is
printf FILEHANDLE FORMAT, VALUES ...
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|