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 -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/