From: Dennis G. <dg...@re...> - 2004-05-13 20:00:29
|
I just did a quick search through the core modules of 5.8.3 and it appears that in most (but not all) of the cases where they read in a file handle in a list context, they set $/ first. CGI.pm and CPAN.pm are a couple examples. Also, http://perldoc.com/perl5.8.4/pod/perlport.html#Newlines indicates that $/ =3D "\n" is cross-platform:=20 Perl uses \n to represent the "logical" newline, where what is logical may depend on the platform in use. By the way, I've been using Log4j for a while on a project at work and was very excited to see Log4perl. It's pretty awesome. Thanks -- Dennis On Thu, 2004-05-13 at 14:40, Mike Schilli wrote: > Kevin Goess wrote on 5/13/2004, 11:09 AM: >=20 > > In which case our init will fail since the user has (however > > ill-advisedly) tinkered with $/, and we are assuming $/ is still "\n" >=20 > Right, that's the behaviour which the manpage discourages. I'm not sure=20 > if modules typically catch this or are supposed to catch this. But if=20 > you guys want it in, I'm ok with it if it doesn't break anything. If=20 > you're sure that setting $/ =3D "\n" is compatible with all OSes, I'll=20 > apply Dennis' patch. >=20 > -- > -- Mike > Mike Schilli > m...@pe... |