sub _guess_eol {
my $file = shift;
my $fh = IO::File->new($file) or return;
my $match = '';
while ( $fh->read( my $chunk, 20 ) ) {
$match .= $chunk;
return $1 if $match =~ m/(\x0a\x0d|\x0d\x0a|\x0a|\x0d)/;
}
return;
}
Looks OK :)
What problems did it cause?
-- Andy Armstrong, hexten.net
