Perl module that opens a file and performs automatic charset detection