in reply to trim header lines in files

You can just chop off the pipe and anything thereafter before you print:

while (<>) { s/^>.+?\K\|.*$//; print; }

If the non-matching lines are quite long but the "or1" tags are short, it will speed things up to specify a quantifier on the substitution (Edit: disregard this optimization if non-matching lines never start with '>'):

    s/^>.{1,10}\K\|.*$//; # Tag is between 1..10 chars
use strict; use warnings; omitted for brevity.