http://qs321.pair.com?node_id=563491

chanakya has asked for the wisdom of the Perl Monks concerning the following question:

Greetings

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:
AT0000937503|20060530|||142.708534||GROUP AG|30618720||||OPEN +|ISIN|4943402|VSE|STOCK|39600000|0.77320
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
$idx =~ s/STOCK/BOXXE/g;
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.

Thanks