Disk size: 21 Inlined, binmode: 21 Slurp, binmode: 21 Inlined, not binmode: 18 Slurp, not binmode: 21 Slurp: 21 Slurp is different from inlined version.

C:\>perl -MFile::Slurp -le "print $File::Slurp::VERSION" 9999.09 C:\>perl -v This is perl, v5.8.6 built for MSWin32-x86-multi-thread (with 3 registered patches, see perl -V for more detail)

Blarg, OK, this may be a problem with sysread.

use strict; use warnings; use Fcntl qw{:DEFAULT}; use Data::Dump qw{dump}; sysopen my $FILE, 'file', O_RDONLY or die $!; my ($temp, $buf); while(1) { my $read_cnt = sysread ($FILE, $temp, 1024); $buf .= $temp; last unless $read_cnt; } print dump($buf);
This gives me the faulty newlines. I think this is a bug in my Perl build. Google turned up some (vague) results to that effect. I assume sysread is supposed to do CRLF translation to \n, just like <>? I checked, and the layers in effect on this filehandle are ("unix", "crlf"). Should be working.

In reply to Re^3: File::Slurp bug? Should I bother? by chester
in thread File::Slurp bug? Should I bother? by chester

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.