in reply to Changing CRLF in Windows to LF for UNIX
#! /usr/bin/perl use warnings; use strict; open my $IN, '<:raw:crlf', shift or die $!; open my $OUT, '>:raw', shift or die $!; print {$OUT} $_ while <$IN>;
:raw turns off the CRLF automatic translation that is the default on MSWin (so the input doesn't really need the layers to be specified).
Call as win2nix input.txt output.txt.
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Changing CRLF in Windows to LF for UNIX
by mabowden (Novice) on Oct 30, 2018 at 21:10 UTC | |
Re^2: Changing CRLF in Windows to LF for UNIX
by mabowden (Novice) on Oct 30, 2018 at 21:01 UTC | |
by choroba (Cardinal) on Oct 30, 2018 at 21:07 UTC | |
by mabowden (Novice) on Oct 30, 2018 at 22:04 UTC | |
by pwagyi (Monk) on Nov 02, 2018 at 08:36 UTC |