on Mon, 29 Jul 2002 15:33:19 GMT, [EMAIL PROTECTED] (Kevin Old)
wrote:
> This code does it, but I need to maintain the format "09".
>
> $hour = (localtime)[2];
> $hour--; #adjust hour to previous
>
> I know about using printf, but I don't need to print this value.
> I need to use it as a variable.
You can use 'sprintf' instead of 'printf' - see
perldoc -f sprintf
You also have to cater for the situation where $hour = 0 to, or you
will get -1.
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]