John W. Krahn wrote: > Mathew Snyder wrote: >> A script I've been working on will provide time spent on a work ticket in >> H:MM >> format. However, if the MM section is less than 10 it only shows as H:M so I >> need to append a 0 to it. So, for instance, if the output looks like this >> 9:7 I >> need to append the 0 to the 7 making it 9:07. >> >> The output is created by joining to array elements like so: >> my $endtime = $endtime[0] . ":" . $endtime[1]; > > my $endtime = sprintf '%d:%02d', @endtime[ 0, 1 ]; > > > John
Thank you, very much. That does precisely what I need it to. Mathew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/