in reply to string gets front truncated

What is your ultimate goal? What will you do with this very big string? This seems like an XY Problem. If you can describe your goal, you will receive more accurate help. For example, if you are planning on parsing the HTML file, there are numerous modules on CPAN to help you out.

Also, How can I read in an entire file all at once? discusses some issues associated with slurping in big files.

Replies are listed 'Best First'.
Re^2: string gets front truncated
by hsfrey (Beadle) on Jul 30, 2008 at 03:58 UTC
    Regardless of my goal, since perl is supposed to have no intrinsic limit on string length, shouldn't I be able to read a long string without it getting truncated? And, isn't it odd that the FRONT is truncated? If a buffer was getting full, I'd expect that the late-arriving data would be dumped. And, if it was starting over to fill it up again from the front, how come it ends at the right place?
      You are assuming that 1) its getting truncated, 2) perl is truncating it. You can't verify the output by what you see in your console. Example
      C:\>perl -e "print qq,\r$_, for 1 .. 3" 3 C:\>perl -e "print qq,\r$_, for 1 .. 3" |hexdump 00000000: 0D 31 0D 32 0D 33 - | 1 2 3| 00000006;
Re^2: string gets front truncated
by Anonymous Monk on Jul 31, 2008 at 03:17 UTC
    why is his goal has anything to do with the problem? He is not asking for an alternative, he is asking why his code does not work. You either have the answer or not, don't waste your time and his as well.