in reply to
Adding formatting to a string
You could simplify your own snippet somewhat:
$string = join '-', unpack 'A4 A*', $string;
Comment on
Re: Adding formatting to a string
Download
Code
In Section
Seekers of Perl Wisdom