in reply to Re: Why doesn't % interpolate?
in thread Why doesn't % interpolate?
If % interpolated, printf would be kind of hard to use, wouldn't it?This does not explain why % does not interpolate; rather it shows that the choice of % as a meta character in printf is a bad one given that % is a sigil. If pritnf used a different meta character (^ for example), then this would work:
So, you can make % interpolate without making printf any harder to use (using ^ instead of % is not harder, just different), you just rather keep printf the way it is (so that people don't get angry).printf "^d\n", $x; # no problem printf "%d\n", $x; # interpolate, no problem printf '^d\n', $x; # ok printf '%d\n', $x; # does not interpolate, ok too
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why doesn't % interpolate?
by Abigail-II (Bishop) on Apr 19, 2003 at 20:02 UTC | |
by abstracts (Hermit) on Apr 19, 2003 at 20:24 UTC | |
by Abigail-II (Bishop) on Apr 19, 2003 at 20:38 UTC | |
by abstracts (Hermit) on Apr 19, 2003 at 20:56 UTC | |
|
Re: Re: Re: Why doesn't % interpolate?
by no_slogan (Deacon) on Apr 20, 2003 at 07:35 UTC | |
by bigj (Monk) on May 16, 2003 at 14:31 UTC | |
by no_slogan (Deacon) on May 16, 2003 at 15:57 UTC |