in reply to Re: missing character when reading input file
in thread missing character when reading input file

With a space between the "lines" instead of a carriage return, is Perl not getting each "line" from: while ($line = <$input>) { }? Never mind. When I look at the original input file that I'm using, those are carriage returns at the ends of the lines.

Replies are listed 'Best First'.
Re^3: missing character when reading input file
by poj (Abbot) on Sep 11, 2018 at 16:03 UTC

    Is that the complete input file. If not how long is the last line ?

    poj
Re^3: missing character when reading input file
by AnomalousMonk (Archbishop) on Sep 12, 2018 at 00:05 UTC
    When I look at the original input file ... those are carriage returns at the ends of the lines.

    Is it literally true that you are seeing "carriage return" (ASCII 0x0d) characters at the ends of your lines? If so, that may be a big part of your problem. On what sort of system do the files originate? Windows? On what sort of system are you processing the files? *nix? Line-ending delimiters are different on these two systems (and on others).


    Give a man a fish:  <%-{-{-{-<