If you know the length of the string, you can use unpack:
print join(':', unpack 'a2a2a2a2a2a2', '00a0c801adc6')),"\n<BR>";
In fact, even if you don't, you could probably do something like this:
my $string = '00a0c801adc6';
print join(':', unpack('a2' x (length($string)/2), $string)),"\n<BR>";
(Documentation on using
unpack seems unusually sparse, so there might be an easier way to do this that I am unaware of.)
Also ++
petral. I knew there had to be a way to use split and extended patterns, but couldn't work it out myself.
Impossible Robot