YuckFoo has asked for the wisdom of the Perl Monks concerning the following question:
But they didn't. The '%d' format didn't cause numification. Oddly enough the '%f' format did numify:
This is perl, v5.6.0 built for i386-linux, so I tried to scan some online perldelta to see if this has been addressed. I didn't find anything, but I'm not really confident that I looked in all the right places.
So has *printf numification changed? And what resource is best, easiest, to find this out?
YuckNummy
#!/usr/bin/perl use strict; my $var = '42a'; my $tmp = $var; printf "'%%d' output : %4.4d\n", $tmp; my $tmp = $var; printf "'%%d' output (with +0): %4.4d\n", $tmp + 0; my $tmp = $var; printf "'%%f' output : %04.0f\n", $tmp; __END__ '%d' output : 0000 '%d' output (with +0): 0042 '%f' output : 0042
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: printf numification
by ikegami (Patriarch) on Sep 27, 2004 at 18:05 UTC | |
by YuckFoo (Abbot) on Sep 27, 2004 at 18:28 UTC | |
|
Re: printf numification
by hv (Prior) on Sep 27, 2004 at 21:42 UTC | |
|
Re: printf numification
by ambrus (Abbot) on Sep 27, 2004 at 19:11 UTC |