in reply to Re: problem in printing the result in the out put file
in thread problem in printing the result in the out put file
Another way to correct it is to use open with the :crlf IO layer (if that's the correct term):
johngg@shiraz:~/perl/Monks > perl -Mstrict -Mwarnings -E ' my $file = qq{Line 1\r\nLine 2\r\nLine 3\r\n}; open my $inFH, q{<:crlf}, \ $file or die $!; while ( <$inFH> ) { chomp; say qq{>$_<}; } close $inFH or die $!;' >Line 1< >Line 2< >Line 3<
I hope this is of interest.
Cheers,
JohnGG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: problem in printing the result in the out put file
by Eily (Monsignor) on Feb 28, 2017 at 19:46 UTC |