in reply to Search and replace the word in Column 16
$str =~ s/^((?:[^|]*\|){15})STOCK/${1}BOXXE/; [download]
$str =~ s/STOCK(?=(?:\|[^|]*){2}$)/BOXXE/; [download]