|P is for Practical|
Search and replace the word in Column 16by chanakya (Friar)
|on Jul 25, 2006 at 12:09 UTC||Need Help??|
chanakya has asked for the wisdom of the Perl Monks concerning the following question:
During the coding process I have encountered a situation where I have to search and replace a particular column
For example I have the following data:
All the output lines generated will be of the same format as above. Before writing to the file
I want to search and replace the column 16 (i,e STOCK) with "BOXXE".
Till now I've been doing as below
Sometimes it may be possible that the same line have the word "STOCK" twice. My current code fails
if the same word appears twice. Please suggest how to replace the word *only* in column 16.