[Omaha.pm] Some lines of a file

James Harr jharr at ist.unomaha.edu
Mon Nov 3 12:05:11 PST 2008


> Laugh! Reverse Perl golf! Longer and harder to read!   ;) 

Don't make me bust out Thread and Thread::Queue to turn this into a
producer/consumer example.

http://thedailywtf.com/Articles/Sprite_Threading.aspx

-----Original Message-----
From: omaha-pm-bounces+jharr=ist.unomaha.edu at pm.org
[mailto:omaha-pm-bounces+jharr=ist.unomaha.edu at pm.org] On Behalf Of Jay
Hannah
Sent: Friday, October 31, 2008 11:26
To: Perl Mongers of Omaha, Nebraska USA
Subject: Re: [Omaha.pm] Some lines of a file

James Harr wrote:
> ... continuing on the path to insanity through inverted loops ...
>
> <> foreach 0 .. 1;
> push @buf, scalar(<>) foreach 0 .. 5;
> sub {push @buf, $_; print shift @buf}->() while <>;
>
> I shouldn't be allowed to code perl.
>   

Laugh! Reverse Perl golf! Longer and harder to read!   ;)

Thanks for   @in = <>;    I like that better than my 3 line version.  :)

j

_______________________________________________
Omaha-pm mailing list
Omaha-pm at pm.org
http://mail.pm.org/mailman/listinfo/omaha-pm


More information about the Omaha-pm mailing list