You could simplify your own snippet somewhat:
$string = join '-', unpack 'A4 A*', $string;In reply to Re: Adding formatting to a string
by Not_a_Number
in thread Adding formatting to a string
by Clownburner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |