my (@newLine) = &AnalyzeFileEol($infile); my $newLine = join("", map { chr(hex($_)) } @newline; local $/ = $newLine; # ------------------------------------------------------------ sub AnalyzeFileEol {    my ($file) = shift;    my $eol = chr(10);    unless (open (FH, "<", $file)) {     die "Error: couldn't read file '$file': $!\n";    } # unless    my @chars = ();    while (defined (my $chr = getc(FH))) {     my $hex = sprintf("%02X", ord($chr));     if ($hex eq '0D') { [...]