In general, this either will Just Work, or else it won't work.

Whether it works or not depends. It depends on stuff. It potentially can depend, for instance, on what operating system you're using, what filesystem (e.g., on Windows it can matter whether it's FAT32 or NTFS, and of course it's never possible with FAT16), what hardware architecture (in particular, whether it's a 32-bit or 64-bit architecture), what compiler was used to compile your perl, what version of which set of C standard libraries it was compiled against and how they were configured when they were compiled, which compiler options were used, and assorted other arcane circumstances you may or may not have any control over.

I'm assuming here that the only problem is that the file is over 2GB. You *did* try your same code, with no changes at all, with a smaller-than-2GB file first, I assume, to make absolutely sure that the file size is the only problem. If not, do so forthwith. Otherwise, my next advice would be to try it on a different computer with a different perl and, if possible, a different operating system and filesystem. As a rule of thumb, it is somewhat more likely to work on more recent versions of perl, on more recent operating systems, and especially on 64-bit systems.


In reply to Re: How to open a file more than 2.6 GB? by jonadab
in thread How to open a file more than 2.6 GB? by zytu

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.