hoppfrosch has asked for the wisdom of the Perl Monks concerning the following question:
I've got a quite obscure problem concerning linewise parsing of files within my huge project.
Isolated problem:
open( F, $file ) || die "Can't open $file - $!"; while (<F>) { print $_; next; }
Runnig this example standalone, everything works fine:
I do have almost the same code within a huge project. Running this code on the same file does not show the same behaviour within my project:
What's going wrong? It used to work formerly - I made a couple of changes "far away" fom this code sequence within my project.
What may perl cause to ignore the CarriageReturn during parsing with while <F>? How can I "force" perl to use carriageReturn as line separator?
???Puzzled???
Hoppfrosch
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl ignores CarriageReturn during fileparsing. Why?
by Athanasius (Archbishop) on Jun 13, 2013 at 12:08 UTC | |
by hoppfrosch (Scribe) on Jun 13, 2013 at 12:21 UTC | |
by space_monk (Chaplain) on Jun 13, 2013 at 12:29 UTC | |
by hoppfrosch (Scribe) on Jun 13, 2013 at 13:52 UTC |