Re: regex substitution question
- From: theillien@xxxxxxxxx (Mathew Snyder)
- Date: Sun, 31 Dec 2006 07:09:20 -0500
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
.
- References:
- regex substitution question
- From: Mathew Snyder
- Re: regex substitution question
- From: John W. Krahn
- regex substitution question
- Prev by Date: Re: regex substitution question
- Next by Date: Re: What's being thrown away?
- Previous by thread: Re: regex substitution question
- Index(es):
Relevant Pages
|