[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

RE: [FWP] beauty vs. brains



> From: Jeff Pinyan [mailto:jeffp@crusoe.net]
> Sent: Wednesday, March 15, 2000 08:32
> To: fwp@technofile.org
> Subject: Re: [FWP] beauty vs. brains
>
>
> >  $file = do { local $/, <FILE> };
>
> Whoa.  Why don't I just do
>
>   { local $/, $file = <FILE> }

Thanks for drawing attention to a 'fun' idiom that turns out to be a
time-waster.

No one has pointed out that the commas in your code should be
semicolons.  That suppresses some warnings about unparenthesized lists
for 'local', but doesn't affect the results.

--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com



==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe