On Fri, Feb 04, 2005 at 09:48:20AM +0000, Andy Armstrong said:
> Do you still need it? It's definitely the line endings thing.

Cool.

FWIW the code we used to have to guess the eol was

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; 
}



Reply via email to