in reply to Re^3: identifying null fields in bar delimited records
in thread identifying null fields in bar delimited records

Given that the null fields can occur at the ends of lines, your split needs to be phrased as follows (update) my first impulse would be to use split as follows (but your way certainly does work) (/update):
my @fields = split( /\|/, $_, -1 );
The "-1" at the end will preserve trailing null fields, so if the input always has a consistent number of field separators on every line, the number of elements assigned to @fields will always be the same. Then it's easy to just step through the array to check for undef elements.