my $value = "8:0:20:0:2:10"; print join "", map { sprintf "%02s", $_ } split /:/, $value;