in reply to Extracting data from file and modifying without making change in file.

Is this what you are looking for??
perl -le 'my @array;my $value="a0b1c2"; sub f1 { $_[0]+1 }; $value=~/(\d)(??{push @arr,f1($1)})/sg; print join "\n",@arr' 1 2 3
  • Comment on Re: Extracting data from file and modifying without making change in file.
  • Download Code