This page has been translated from Italian

You know, programmers are basically of Entertainers and as such they behave well when they write about serious things like that then the components will be reused around the world, even for important projects such as Amazon and many others.

Now, a particular thing of all components Perl, also called modules, you must always return a true value. Perl is true then everything that is not zero, it is expected that all the modules end with



But like I said, programmers are pranksters and then connects this to the fact that, in Perl, any non-zero value is true, and we find that not all Perl modules end with the string above.

In fact it turns out that you have created a form affixed to try and count the return values of the various Perl modules available on CPAN and that, surprisingly, not all end up in one.

Here is a non-exhaustive list of the most inventive:

And so on ... but when you go to see what the return value except of course the most used one, it turns out that this is the number 42 used in a well-82 modules.

Despite having seen the film I must admit that I spent about ten minutes of internet research first to understand why 42.

And you know it the fundamental question about life, the universe and everything?

And now I leave you with a simple task for the home: what to print the following piece of code that uses the module Acme:: CPANAuthors?

 use Acme:: CPANAuthors;
 my $ authors = Acme:: CPANAuthors-> new ( 'English');
 my $ name = $ author-> name ( 'EBRUNI');
 print $ name;
This article has been viewed 49 times

Leave a comment

/ me runs