sofreshsoclean has asked for the wisdom of the Perl Monks concerning the following question:
pref1\t0\n pref2\t1\n pref3\t0\n pref4\t1\n
What code would I use to search for the line starting with $a (pref1, pref2... etc) and change the single digit following it to another single digit. I do not want to have to rewrite the entire file because it may be quite long.
thanks
z
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How can I replace a single character (digit) in a file
by kschwab (Vicar) on Jul 30, 2001 at 01:17 UTC | |
by sofreshsoclean (Initiate) on Jul 30, 2001 at 05:52 UTC | |
by ides (Deacon) on Jul 30, 2001 at 01:20 UTC | |
|
Re: How can I replace a single character (digit) in a file
by ides (Deacon) on Jul 30, 2001 at 01:17 UTC |