Perl Maven

Welcome future Perl Maven!

What can you do here?

If you are a beginner, or would like to refresh your Perl programming knowledge, you can go over the Perl tutorial.

You will find a few advanced articles too, though most of the advanced articles are available to the subscribers of the Perl Maven Pro service only.

If you are interested to listen to or even see other Perl developers, the Perl Maven TV Show is a collection of such interviews.

Want to make sure you don't miss any of the Perl Maven articels? Sign up to the newsletter!

Recent Articles

Pro: Show CPANstats on every page

Now that we have these generic stats on our system, we should replace the hard-coded numbers we have on the front page. As we know these numbers will have to be displayed on every page, we don't add it to the code that displays only the main page. Instead we add our code to the template() function that will be called for every page.

Show CPANstats on every page

Simple timestamp generation using POSIX strftime in Perl

Very often I need to add a timestamp to some log file, or create a file based on a the current date. There are plenty of really good modules on CPAN to handle dates and times, that can help creating these timestamps, but this time I am going to use the strftime function of the standard POSIX module.

Simple timestamp generation using POSIX strftime in Perl

Pro: Get CPANstats from MetaCPAN using cron

When we copied the look-and-feel from, we also copied the stats at the bottom of the page. We already knew back then that we'll have to change this to show up-to-date data. It's time to do that.

We know that these numbers are displayed on every page of search-cpan-org, and we also know that these numbers don't need to be totally up-to-date. so instead of fetching them from MetaCPAN on every request, we can create a separate script that will fetch these numbers once a day and store them in a file.

The site can then fill the pages with the data from this file.

Get CPANstats from MetaCPAN using cron

Do you want to improve your Perl?

Register to the FREE Perl Maven newsletter here.
or to the Perl Weekly newletter over there

Do you want to become a Pro?

Check out the Perl Maven Pro.