in reply to $_ as default printf arg fails

G'day Neutron Jack,

While I agree the documentation for printf is not really up to scratch; I also think your comments are based on a false premise.

The documentation shows four forms that the function can take; two have no LIST (printf FILEHANDLE and printf):

$ perl -Mstrict -Mwarnings -E '$_ = 42; printf STDERR' 42 $ perl -Mstrict -Mwarnings -E '$_ = 42; printf' 42

However, the documentation uses list and LIST in an ambiguous manner; furthermore, use of the lowercase list is, at best, misleading (but, more likely, an error).

list (lowercase)

An equivalence is shown:

print FILEHANDLE sprintf(FORMAT, LIST)

followed by "... The first argument of the list will be interpreted as the printf format."

My best guess is that this is supposed to refer to the list of arguments to sprintf — but that's all that is, a complete guess. The documentation would be greatly improved if that was clarified.

LIST (uppercase)

The "If you omit the LIST, $_ is used; to use FILEHANDLE without a LIST, ..." text follows the sprintf ambiguity. I believe this refers to the two printf forms (shown at the top) which do not contain LIST. Without the confusing text before it, I think would be somewhat more obvious; however, additional clarification might not go astray here either.

-- Ken