in reply to How to Read REP file

You want to turn on binary mode.
open(REP, "yourfile") or die $!; binmode REP;