summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pod/perlfunc.pod9
-rw-r--r--t/op/sprintf.t1
2 files changed, 6 insertions, 4 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 68d190f97f..b5fb4f1813 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -7410,10 +7410,11 @@ value to format.
Here are some more examples; be aware that when using an explicit
index, the C<$> may need escaping:
- printf "%2\$d %d\n", 12, 34; # will print "34 12\n"
- printf "%2\$d %d %d\n", 12, 34; # will print "34 12 34\n"
- printf "%3\$d %d %d\n", 12, 34, 56; # will print "56 12 34\n"
- printf "%2\$*3\$d %d\n", 12, 34, 3; # will print " 34 12\n"
+ printf "%2\$d %d\n", 12, 34; # will print "34 12\n"
+ printf "%2\$d %d %d\n", 12, 34; # will print "34 12 34\n"
+ printf "%3\$d %d %d\n", 12, 34, 56; # will print "56 12 34\n"
+ printf "%2\$*3\$d %d\n", 12, 34, 3; # will print " 34 12\n"
+ printf "%*1\$.*f\n", 4, 5, 10; # will print "5.0000\n"
=back
diff --git a/t/op/sprintf.t b/t/op/sprintf.t
index db934c7100..c6550d0d54 100644
--- a/t/op/sprintf.t
+++ b/t/op/sprintf.t
@@ -312,6 +312,7 @@ __END__
>%4.*2$d< >[5,3]< > 005< >width with reordered precision<
>%*3$.*2$d< >[5,3,4]< > 005< >reordered width with reordered precision<
>%3$*2$.*1$d< >[3,4,5]< > 005< >reordered param, width, precision<
+>%*1$.*f< >[4, 5, 10]< >5.0000< >perl #125956: reordered param, width, precision, floating point<
>%d< >-1< >-1<
>%-d< >-1< >-1<
>%+d< >-1< >-1<