you could try unpack for this, given you seem to be looking
for fixed length string processing. after all, why use vulgar regexen when the refined
unpack is ready to help?
in the following i also use sprintf to deal with leading
zeros.
print join ":", map {sprintf("%d",$_)} unpack("A4A4",shift);
...wufnik
-- in the world of the mules there are no rules --