rfits has problems reading data records consisting of
character strings (rA) and bit arrays (rX). In bit
arrays the bits are encoded into integral number of
bytes with trailing bits zero, not as one byte per bit.
In the character array reading routine the replacement
substr(..,..,..,'') was missing.
What is a bit alarming, I did not understand the
meaning of the line 588 in FITS.pm (if(ref $szptr eq
'SCALAR') ....), because the variable pointed by $szptr
will always change from scalar into PDL during the
processing.. Anyway, taking that out made the byte
Patch is included..