- or download this
local $/ = "\r\n";
while (<DATA>) {
chomp $_;
print STDERR "'$_'\n";
}
- or download this
while (<DATA>) {
s/\r[\n]*/\n/gm; # now, an \r (Mac) or \r\n (Win) becomes \n (UNIX
+)
chomp $_;
print STDERR "'$_'\n";
}
- or download this
s/\r[\n]*//gm;
- or download this
open FH, '<', $file or die "Can't read '$file': $!";
# find out what kind of line endings we have
...
print STDERR "'$_'\n";
}
close FH;