I like this approach, in that it places the complexity outside of the loop. 
Another generalized approach might be a new $ var which turns autochomp off 
and on for all fh's (are there any $'s left? :D ).


Cheers,
Ed


>From: Jonathan Scott Duff <[EMAIL PROTECTED]>
>To: Ed Mills <[EMAIL PROTECTED]>, "Brust, Corwin" <[EMAIL PROTECTED]>, 
>[EMAIL PROTECTED], 'Simply Hao' <[EMAIL PROTECTED]>
>Subject: Re: Things to remove
>Date: Tue, 8 Aug 2000 13:21:56 -0500
>
>On Tue, Aug 08, 2000 at 01:53:21PM -0400, Ted Ashton wrote:
> > I'm not sure if I'm the someone you meant, but if so, the proposal was 
>to make
> >
> >         while (chomp(<FH>)) { ... }
> >
> > work like
> >
> >         while (<FH>) { chomp; ... }
>
>Oh.  I think I'd prefer to see chomp() go away and be replaced by
>something like this:
>
>       $fh = open "foo" or die;
>       $fh->auto_chomp = 1;            # Insert some appropriate syntax
>       $fh->newline = "\n";            # Insert some appropriate syntax
>       while (<$fh>) {
>           ...
>       }
>       close $fh;
>
>-Scott
>--
>Jonathan Scott Duff
>[EMAIL PROTECTED]

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

Reply via email to