in reply to text reformatting woes

Couple things I see right away: looks like your first split should be on /\n\n/, and you are printing the return value of chomp($l1) where I think you want to first to do the chomp($l1) and then print $l1 (chomp doesn't return what you think).

Update: the chomp isn't even needed, since you've split on /\n/. Just replace chomp($l1) with $l1.

Update (more comments): you are using $4 and $8 without checking that the match succeeded. I'd at the very least say

if ($l2 =~ s/..../..../) { # $x and $y munging code # and substitution back into $l2 }
and preferably also add
else { warn "houston, we have a problem: $l2 "; }
I see from your use of \1,\2, etc. that you aren't using warnings; stick a use warnings; and use strict; at the top, declare your variables (with real names instead of l1, l2, etc.), and see what other problems turn up for you.

If $x or $y end up getting incremented, I think they may lose trailing zeros; if this is a problem, replace ++$x with $x = sprintf "%.2d", $x+1;; better yet, replace your whole substitution/rounding code with

s!(\d\d)\:(\d\d)\:(\d\d),(\d\d\d) --> (\d\d)\:(\d\d)\:(\d\d),(\d\d\d)! +sprintf("%s;%s;%s;%02.0f %s;%s;%s;%02.0f",$1,$2,$3,$4/10,$5,$6,$7,$8/ +10)!e
Update: even that has problems with 01:59:59,995 (which I'm guessing should become 02;00;00;00). Easiest way to avoid that is just add up total milliseconds and then divide it back out into hr,min,sec,centisecs.