May 2013 Archives

Improved autobox-ing. I'm loving it :o)

print (0..9)->grep { $_ > 5 }
            ->map  { $_ * 2 }
            ->join(' - ');

 # prints: 12 - 14 - 16 - 18

Isn’t that nice ? It is now possible with

use autobox::Core;    
use PerlX::MethodCallWithBlock;

The clearest way(s) to check if a List contains...

There is more than one way to do it.Toby Inkster’s Creating your own Perl hits the nail on the head: with Perl you can choose the language that you code in

"So go on; create your own Perl. Make it your gift to yourself."

( Syntax::Collector makes it very simple, and will also help you bundle your “most used modules” - more useful modules in Toby’s article)

Today i’m going to explore one aspect of the Perl language:

how do you check that a list contains a given element?

About mascip

user-pic Perl, Javascript (AngularJS), Coffeescript, Firebase