On Wed, 26 Sep 2001, Schoeneman, Carl wrote:
> Is there a way to pad a number with leading zeros with 1 command rather than
> the 2 I used below? It looks like you're supposed to be able to zero-fill
> with sprintf but I couldn't figure it out.
$x = 1234;
printf "%06d\n", $x
prints
001234
-- Brett
http://www.chapelperilous.net/
------------------------------------------------------------------------
"I have to convince you, or at least snow you ..."
-- Prof. Romas Aleliunas, CS 435
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]