http://www.perlmonks.org?node_id=1018402


in reply to Casting return value of unpack properly

You could always throw in a quick grep {defined $_} to filter them out.