in reply to Weird string
Your configuration file is a text file. You should not be setting binmode on FH. Try it without binmode FH and you will probably get the output you are expecting.