in reply to UFT-8 Error

This relates to a "feature" of 5.8.0, possibly made worse by something peculiar to RedHat 8 and its handling of "locale" settings. I believe it will not be a feature of 5.8.1 (that is, people recognize this as a bug that needs fixing).

Basically, despite your intention of reading raw bytes from a non-text data file, your RedHat "locale" is inducing Perl 5.8.0 to treat non-ASCII data as if it were intended to be utf8. (The actual problem may need a more detailed description, but I think I captured the essence of it.)

Until 5.8.1 comes out, you have a work-around: insert this line into your script, near the top:

use bytes;
That should disable any hidden agendas about treating stuff as utf8. If I'm wrong about that, check the "perlunicode" man page -- that should explain things better and more accurately.