in reply to Grabbing anything between pipe delimiters

To solve your problem without answering the question:

my @fields = split /\|/, $line;
Using regexps is possible, but, given your requirements, sounds like the wrong solution. Something like this would work, but I'd still suggest split.
my @a = $line =~ /([^\|]+)\|?/g;