|
|
| P is for Practical | |
| PerlMonks |
Re^2: printf questionby RMGir (Parson) |
| on Jan 21, 2010 at 12:53 UTC ( #818707=note: print w/ replies, xml ) | Need Help?? |
|
almut's right. You can get a slight improvement by keeping track of your longest word as you count them, though, and then using printf's "*" modifier to read the field width from that variable. I'd put a width specifier on the %d so the numbers line up nicely as well, but that's just my preference:
Mike
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||