perldoc -f sprintf

This function will do what you want.

-----Original Message-----
From: Jeff Tillotson [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 01, 2003 12:36 PM
To: [EMAIL PROTECTED]
Subject: fixed width variable

Greetings,
I have been searching for a way to do this and have not had any luck.

I am using localtime() to determine the day of the month.  I need to
make sure the variable it returns will always be 2 digits and padded
with zeros.  For example currently it is like:
        $var = (localtime)[3];
$var would be 5.

I would like $var to be 05 in that case.  However if it were 13 then
$var would be 13.

Any suggestions or pointers?
        
Thanks,
Jeff


--
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to