in reply to Re: How to get the current Date and Time using Perl on windows?
in thread How to get the current Date and Time using Perl on windows?
print "Time:\t".sprintf("%02d",$hour).":".sprintf("%02d",$min).":".spr +intf("%02d",$sec)."\n";
Perhaps you could use printf rather than print and sprintf and avoid concatenation to make that easier to read.
printf qq{Time:\t%02d:%02d:%02d\n}, $hour, $min, $sec;
I hope this is of interest.
Cheers,
JohnGG
|
|---|