in reply to Search and replace the word in Column 16

Regexp-based way is imho worse than spliting and joining, but it allows to do all work in one line:
$str =~ s/^((?:[^|]*\|){15})STOCK/${1}BOXXE/;
Or, if you prefer counting back from the end of the string and dislike capturing:
$str =~ s/STOCK(?=(?:\|[^|]*){2}$)/BOXXE/;

     s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print