Hi

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)


In reply to Re: $_ as default printf arg fails by LanX
in thread $_ as default printf arg fails by Neutron Jack

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.