Folks,

I have this little tad bit of code

        my $left = $timer - time();
        my $min = $left / 60 % 60;
        my $sec = $left % 60;
        sleep $ARGV[1];
        printf OFN "Time remaining until next egrep: %d:%d\n", $min, $sec;

works like a champ! except the output formatting
The $min is no problem, but I have a prob with $sec, when it goes below 10
seconds
I do not get the 0 as in 09 , 08, 07 ,06 etc..

what could I do to ensure that the $sec is _always_ 2 digits?

%.0f ???

-Ron

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

Reply via email to