Perl6::Form sprintf printf doesn't show example so look for one in the tests
1170 1171 { 1172 # gh #17221 1173 my ($off1, $off2); 1174 my $x = eval { sprintf "%n0%n\x{100}", $off1, $off2 }; 1175 is($@, "", "no exception"); 1176 is($x, "0\x{100}", "reasonable result"); 1177 is($off1, 0, "offset at start"); 1178 is($off2, 1, "offset after 0"); 1179 } 1180
https://perl5.git.perl.org/perl5.git/blob/HEAD:/t/op/sprintf2.t#l1174 Instructions  173 # In each of the following lines, there are three required fields:... https://perl5.git.perl.org/perl5.git/blob/HEAD:/t/op/sprintf.t#l173 https://perl5.git.perl.org/perl5.git/blob/HEAD:/t/op/sprintf.t#l481
481 >%s< >sprintf('%%n%n %d', $n, $n)< >%n 2< >Slight sneakiness to te +st %n< 482 >%s< >$n="abc"; sprintf(' %n%s', substr($n,1,1), $n)< > a1c< >%n +w/magic< 483 >%s< >no warnings; sprintf('%s%n', chr(256)x5, $n),$n< >5< >Unico +de %n< 484 >
I imagine running the test file might show whats executed

In reply to Re: How to use sprintf %n formatting pattern by Anonymous Monk
in thread How to use sprintf %n formatting pattern by ibm1620

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.