Your example output seems to be inconsistent. In the first line the space before the '-1' is not substituted with a comma but in the second it is. Please could you clarify your requirement.
Cheers,
JohnGG
In reply to Re: perl substitue till found pattern in aline
by johngg
in thread perl substitue till found pattern in aline
by Vijay81
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |