Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
But I am not getting it right...can anyone help meopen (OUT, "+>>$file") or die "Can't open $file: $!\n"; while ( <OUT>) { print "$_"; # $test=grep /$key/,$line; if (m/,$key/){ print " found the line $_ \n"; my($key,$val)=split(/,/,$_); $newval=$val+1; $line =~ s/$val/$newval/g; print $line; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: replace field
by ikegami (Patriarch) on Jul 30, 2009 at 21:03 UTC | |
|
Re: replace field
by jethro (Monsignor) on Jul 30, 2009 at 21:20 UTC | |
|
Re: replace field
by Marshall (Canon) on Jul 30, 2009 at 21:11 UTC | |
|
Re: replace field
by jwkrahn (Abbot) on Jul 30, 2009 at 21:26 UTC | |
by Anonymous Monk on Jul 31, 2009 at 13:21 UTC | |
by BioLion (Curate) on Jul 31, 2009 at 15:54 UTC | |
by Anonymous Monk on Jul 31, 2009 at 13:32 UTC |