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

Re: [Omaha.pm] Some lines of a file



> 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@pm.org
[mailto:omaha-pm-bounces+jharr=ist.unomaha.edu@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@pm.org
http://mail.pm.org/mailman/listinfo/omaha-pm