in reply to Round off Time to nearest second
If you know the time has formate "HH:MM:SS.FRACTION" (that is, you always have 2 digits for hours, minutes, seconds), you can also do:$time =~ s/\..*//;
substr $time, 8, -1, ""; # Or $time = substr $time, 0, 8;
|
|---|