No such thing as a small change | |
PerlMonks |
Problem changing only first occurence of pattern in fileby JimJx (Beadle) |
on Oct 17, 2006 at 13:18 UTC ( [id://578755]=perlquestion: print w/replies, xml ) | Need Help?? |
JimJx has asked for the wisdom of the Perl Monks concerning the following question:
I have a small flatfile, ~100 lines, that I need to access and change one entry in. For example
abc1|0001|Yes What I need to do is find the first occurance of No and change it to Yes. Pretty simple usually.... But for some reason, it will find the first occurance and change that and the next occurance also.
What I get is.
Any suggestions?
2006-10-17 Retitled by jeffa, as per Monastery guidelines
Back to
Seekers of Perl Wisdom
|
|