Gossamer Forum
Home : General : Perl Programming :

Re: [mtorres] why does perl round my numbers ?

Quote Reply
Re: [mtorres] why does perl round my numbers ? In reply to
Hi mtorres,

It's not rounding the numbers. localtime returns the number of minutes without prepending the 0 on miuntes under 10. You'll have to fix it by doing somthing like this:

Code:
$min = '0' . $min if (length $min == 1);

~Charlie
Subject Author Views Date
Thread why does perl round my numbers ? mtorres 5652 Dec 24, 2003, 7:13 AM
Thread Re: [mtorres] why does perl round my numbers ?
Chaz 5549 Dec 24, 2003, 8:09 AM
Thread Re: [Chaz] why does perl round my numbers ?
mtorres 5540 Dec 24, 2003, 8:14 AM
Post Re: [mtorres] why does perl round my numbers ?
Chaz 5519 Dec 24, 2003, 8:40 AM