in reply to Re^2: Dera Monks, Have create multiple file from one file now I want to match a pattern in each file at the same time do the replacement with adding one to the match pattern.
in thread Dera Monks, Have create multiple file from one file now I want to match a pattern in each file at the same time do the replacement with adding one to the match pattern.

Yes Dera your understanding is correct. Could you please help me tell how to do substitution incrementally. As I try to do with \K which seems not working for me, done the changes $n++

$lines[0] =~ s~/4947000219/\K(4947000210+)~$1+$n~e;
  • Comment on Re^3: Dera Monks, Have create multiple file from one file now I want to match a pattern in each file at the same time do the replacement with adding one to the match pattern.
  • Download Code