http://www.perlmonks.org?node_id=383979


in reply to Re: How do I read an entire file into a string?
in thread How do I read an entire file into a string?

It is worth noting that File::Slurp does NOT support binmode

Replies are listed 'Best First'.
Re^2: Answer: How do I read an entire file into a string?
by bmann (Priest) on Aug 18, 2004 at 20:17 UTC
    It is worth noting that File::Slurp does NOT support binmode

    Are you sure? From the pod:

    If you set the binmode option, then the file will be slurped in binary + mode. my $bin_data = read_file( $bin_file, binmode => ':raw' ) ;