Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: How is the default "Input Record Separator" set?by haukex (Archbishop) |
on Mar 15, 2021 at 18:56 UTC ( [id://11129709]=note: print w/replies, xml ) | Need Help?? |
In this case, I have 2 different perl implementations installed, one being cygwin (perl version 5.26, which is the one that keeps the CR) and the other being a standalone perl (perl v5.8.8, which is the one that eliminates the CR). It's been a while since I worked with cygwin, but I assume that it's acting like a *NIX system would and not loading the :crlf layer by default - try perl -le "print for PerlIO::get_layers(*STDIN)" at the command line to check. Note that you can be really explicit about the fact that you want the :crlf layer to be loaded: try and see if open my $makefileToProcess, "<:raw:crlf", ... makes it work on both Perls. Also note that 5.8.8 is now over 15 years old. You probably want to consider upgrading, see Strawberry Perl.
In Section
Seekers of Perl Wisdom
|
|