in reply to (s)printf question: eliminating plus sign before zeros
You can get rid of that pesky + by changing: printf '%+4d', $_ for @nums; to printf '%+4.0f', $_||-.1 for @nums; Update: yes, that will produce "-0" which is correct behaviour for negative numbers that printf %f has to round to 0.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: (s)printf question: eliminating plus sign before zeros
by Not_a_Number (Prior) on Dec 18, 2003 at 00:18 UTC |