Skip to content

Commit

Permalink
wrap examples in single quotes
Browse files Browse the repository at this point in the history
Examples that use $ as metacharacter should be in single quotes,
or the dollar must be escaped.
  • Loading branch information
FROGGS authored and Karl Williamson committed Jan 26, 2013
1 parent f67a080 commit 073d685
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,7 @@ Tim Witham <[email protected]>
Timothe Litt <[email protected]>
Timur I. Bakeyev <[email protected]>
Tkil <[email protected]>
Tobias Leich <[email protected]>
Todd C. Miller <[email protected]>
Todd Rinaldo <[email protected]>
Todd T. Fries <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions pod/perlfunc.pod
Original file line number Diff line number Diff line change
Expand Up @@ -7112,7 +7112,7 @@ or from a specified argument (e.g., with C<*2$>):
printf "<%s>", "a"; # prints "<a>"
printf "<%6s>", "a"; # prints "< a>"
printf "<%*s>", 6, "a"; # prints "< a>"
printf "<%*2$s>", "a", 6; # prints "< a>"
printf '<%*2$s>', "a", 6; # prints "< a>"
printf "<%2s>", "long"; # prints "<long>" (does not truncate)

If a field width obtained through C<*> is negative, it has the same
Expand Down Expand Up @@ -7192,7 +7192,7 @@ You cannot currently get the precision from a specified number,
but it is intended that this will be possible in the future, for
example using C<.*2$>:

printf "<%.*2$x>", 1, 6; # INVALID, but in future will print
printf '<%.*2$x>', 1, 6; # INVALID, but in future will print
# "<000001>"

=item size
Expand Down Expand Up @@ -7286,7 +7286,7 @@ So:
uses C<$a> for the width, C<$b> for the precision, and C<$c>
as the value to format; while:

printf "<%*1$.*s>", $a, $b;
printf '<%*1$.*s>', $a, $b;

would use C<$a> for the width and precision, and C<$b> as the
value to format.
Expand Down

0 comments on commit 073d685

Please sign in to comment.