in reply to text reformatting woes

You can't do output with regexp syntax - see perldoc sprintf for propper syntax.

print sprintf "#%d %02d:%02d:%02d %02d:%02d:%02d\n",@l3;