in reply to Adding formatting to a string

$string =~ s/DF/D-F/g;
or more generic
$string =~ s/^(.{4})/$1\-/g;