-- I have a very basic script:
my ($sec,$min,$hour,$mday,$foo) = localtime time;
$time_now = "$hour$min";
-- I purposely leave out the ":" because i want the whole number.
How come when the time is 10:05, i print $time_now , and it returns '105' ?? It should be 1005. WHERE DID MY EXTRA '0' GO ? It only does this with zero's. If the time was 11:35, it would print 1135 just like i want it to. anyone know how to stop it from doing that ? Thanks in advance for your help :)
my ($sec,$min,$hour,$mday,$foo) = localtime time;
$time_now = "$hour$min";
-- I purposely leave out the ":" because i want the whole number.
How come when the time is 10:05, i print $time_now , and it returns '105' ?? It should be 1005. WHERE DID MY EXTRA '0' GO ? It only does this with zero's. If the time was 11:35, it would print 1135 just like i want it to. anyone know how to stop it from doing that ? Thanks in advance for your help :)