Not a direct answer to your question, but consult perldoc perlrun for the -a flag which you've inadvertently recreated.
In reply to Re: changing a portion of a line leaving its formatting intact
by Fletch
in thread changing a portion of a line leaving its formatting intact
by bronto
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |