http://www.perlmonks.org?node_id=1006752


in reply to perl substitue till found pattern in aline

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

Replies are listed 'Best First'.
Re^2: perl substitue till found pattern in aline
by Vijay81 (Acolyte) on Dec 03, 2012 at 08:36 UTC
    Sorry it was typo mistake
    01,fines,name,2222,-P,sws,-1 reee.tee rrt 02,fi,si,2232,-P,sqww,-1 re.wqw ttf