in reply to Formating question

It looks like you can't do that with '#' in a format. Sigh.

So (There Is More Than One Way ... after all), we use sprintf() and pre-format our field.

my $hh1_char = sprintf("%02d", $hh1); my $mm1_char = sprintf("%02d", $mm1); my $ss1_char = sprintf("%02d", $ss1);
Then use $hh1_char, etc, in your format list. (Changing the appropriate '#'s to '<'s, of course.)

The sprintf() format ("%02d") says we are going to have decimal digits, two of them, and fill any leading spaces with zeros please.

----
I Go Back to Sleep, Now.

OGB