in reply to Re: string gets front truncated
in thread string gets front truncated

> i guess some editors have limitation in terms of number charcaters it can display in a single line, < I'm not reading it in an editor - I'm just printing it out in the DOS box. And again, whatever I'm going to use it for, shouldn't this be allowed in perl? BTW, it doesn't seem to be caused by a memory shortage - I killed about 6 programs that were running simultaneously, and the front-truncation happened in exactly the same place.

Replies are listed 'Best First'.
Re^3: string gets front truncated
by ysth (Canon) on Jul 30, 2008 at 04:31 UTC
    And again, whatever I'm going to use it for, shouldn't this be allowed in perl?
    Yes, it should and is. I think everyone responding is in no doubt that the problem is something other than the front of the string magically disappearing.

    Try putting this in place of the print (in the chomp-less version):

    printf "total of %d bytes read (%d including carriage returns)\n", length($wholeString), $. + length($wholeString);
    and comparing that to the length of the input file as reported by the dir command?
    I'm just printing it out in the DOS box.
    I've seen console windows omit bits of the output when flooded with data. Have you tried doing ConvertFindLaw.pl PilotLifeFindLaw.htm >tempfile and looking to see what's in tempfile?
Re^3: string gets front truncated
by systems (Pilgrim) on Jul 30, 2008 at 08:29 UTC
    In agreement with ysth, the problem is most likely with your DOS window.

    DOS windows have a limit on the buffer size it can display, try increasing it, but still the maximum value might not be enough. So either use Windows Powershell or print the string to a file.