To add the 0, you can use sprintf();
$scalar = "9:59";
@temp = split /:/,$scalar;
$temp[0] = sprintf(%02d,$temp[0]);
# $temp[0] now equals "09"
# $temp[1] now equal "59"
Now you haven't really described the nature of the data all that well, but
you can probably figure it out from here.
-
R wrote:
>
> Need help on substitute and Join.
>
> I am breaking incoming mostly fixed layout records into pieces such that I can re
>JOIN them after inspecting the first 3 characters independently and changing the
>column 2 to make it be columns 2 and 3, with a leading 0.
>
> Problem is t