[Bioperl-l] Bio::Root::IO::_readline

Allen Day allenday@ucla.edu
Mon, 7 Oct 2002 22:49:21 -0700 (PDT)


okay, how about this:

$tease->_readline(-strip=>0);

where the default value of -strip is 1, which causes \r\n to become \n.  

i've gone ahead and checked this in, let me know if there are objections.

-Allen


On Mon, 7 Oct 2002, Hilmar Lapp wrote:

> Some regexs test explicitly for newline. I remember that DOS/Win 
> CRLF screwed up some code ... I don't know exactly which one though.
> 
> What about adding an optional parameter that if evaluates to true 
> prevents newline from being stripped? This would avoid another 
> method, fast, and be backward compatible.
> 
> 	-hilmar
> 
> On Monday, October 7, 2002, at 05:51 PM, Allen Day wrote:
> 
> > The functionality surprised me here:
> >
> > $line =~ s/\r\n/\n/g if (defined $line);
> >
> > Do we need to do this?  I have an application that needs to 
> > preserve CRLF
> > as-is.  If this is necessary, I'd like to add another function that
> > doesn't strip off line endings.  What should this function be called?
> >
> > -Allen
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l@bioperl.org
> > http://bioperl.org/mailman/listinfo/bioperl-l
> >
> --
> -------------------------------------------------------------
> Hilmar Lapp                            email: lapp at gnf.org
> GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
> -------------------------------------------------------------
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>