in reply to (s)printf using argument selection
The Camel doesn't fully spell out the use of every built-in function. From perldoc sprintf:
Between the % and the format letter, you may specify a number of additional attributes controlling the interpretation of the format. In order, these are: * format parameter index An explicit format parameter index, such as 2$. By default sprintf will format the next unused argument in the list, but this allows you to take the arguments out of order, e.g.:
printf '%2$d %1$d', 12, 34; # prints "34 12" printf '%3$d %d %1$d', 1, 2, 3; # prints "3 1 1"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: (s)printf using argument selection
by prowler (Friar) on Feb 23, 2007 at 07:49 UTC |