Before reading this entry, please note that this problem has been solved. You can now find fresh tutorials at the:





And now back to your scheduled rant:

On monday a blog post made the rounds that claimed "Perl users were unable to write programs more accurately than those using a language designed by chance." Naturally that is not the entire truth. As it turns out they "trained" their test subjects using examples of code that they considered representative of what a user would find when trying to learn Perl from the internet. That code looked like this:

$x = &z(1, 100, 3); sub z{

$a = $ [0];

$b = $ [1];

...

for ($i = $a; $i <= $b; $i++){

...

if ($d > $e) {

$d;

}

$e;

}



Naturally the outcry (including from me) went: "But that is Perl 4 code, of course the test subjects had a friggin hard time with it!" But were they wrong in choosing that example to teach with? Was that representative of what a complete perl beginner would find online?

Turns out, that yes, it was representative. The code above represents exactly the very first thing found when looking for Perl learning material.

How so? In a post yesterday i asked for help in finding out what a perl newbie would try first when wanting to learn Perl. Google Trends is a great tool, as it shows comparatively how often certain search terms are used. And it turns out that among the highest performing search terms there is one that is at least twice as often used as any other search term:





And quite frankly, the results for that search suck. Incredibly so.

The first result, a site by the University of Leeds, in the UK, carries this warning at the top: "This tutorial was written in the early 1990's for version 4 of Perl. Although it is now significantly out of date, it was a popular source of information for many people over many years. It has therefore been left on-line as part of the historical archive of the Internet." 21 years later, in 2011, it is still the very first thing Google brings up when looking for perl tutorials and that is exactly what newbies world-wide do first.

Make no mistake though, it is not just the first result that is terrible. Result two ( perltutorials.org ), features Perl 4 code as well and result three ( tizag.com ) attempts to teach "PERL", also using Perl 4 reminiscent code. Search result four is a highlight, in that it is Gabor Szabo's excellent fledgling Perl tutorial series with videos. But the very next result goes back to 2000, with an article on perl.com, which already features 5.10 and nicer forms of `for`, but still eschews talking about strict, warnings, or even using `my`. After that comes Learning Perl, which is a bit barebones, but features a nice modern Hello World. Yet right next up is a link to a free online copy of the book Beginning Perl, which might sound nice, but is anything but, thanks to being the edition from 2000, which teaches Perl 5.6.

I could go on, but it doesn't get any better. Only worse.

If you've wondered why the public perception of Perl is that of an old language, this is the reason. Our public face to anyone new to Perl and wanting to learn is dominated by material from the turn of the century, or earlier.

Now, i honestly do not know how to best solve this, but i can bring up some ideas.

Now, as far as i am aware there is no current, definitive and in-depth Perl tutorial anywhere. Please correct me if there is one.

Gabor Szabo has made a good start, but it's only a start. Right now his series is tiny and he is only one person. Another good attempt it learn.perl.org, bug again, too small in scope. It provides a few bites, a few examples, basically just a taste of Perl and then tells the peruser to look at other sites. These approaches suffer from a few flaws in that they fail to properly capture and provide for the newbie.

So, we need a good modern Perl tutorial. Not just books. We need something in the style of the Leeds University document, but with all the anachronisms filtered out and current knowledge inserted. Something like the Python Tutorial. And most importantly, it needs to be a community effort. It cannot hinge on just one person.

Possible options i see are to either create a wiki on a domain like tutorial.perl.org/com and take pains to ensure that editing and updating it is easy and effortless. Alternatively it could be done by ways of a github repo, possibly even within the perl core repo, which is then exported to HTML regularly.

Using a structure like this, the community at large could concentrate on writing the textual content, while people like Gabor can still contribute videos. It could be a very nice mix of the python tutorial and RailsCasts.

Make it good enough, publicize it and Google search results would right themselves on their own.

Another option would be to reach out to the maintainers of those sites and convince them to take down their sites or at the very least add links that prominently point to more modern content. Alternatively they could be asked to cooperate with the Perl community in making it possible to change and update the contents of those sites.

Then there's also the matter of the people linking to those sites, outreach could also be done to them by ways of finding out with www.backlinkwatch.com who links to them, and then convince those sites to remove/change their links to newer materials.

Failing the above two, there are still measures that could be taken to aggressively alter Google's view on what's relevant to perl tutorials. This could be in the form of burying results we do not care about, or promoting results we do care about. It is in my eyes a last resort and might involve money expenditure, but given the circumstances i do not see it as entirely unwarranted.

Edit: A suggestion from Reddit: "the new +1 feature for search results may come in handy. Get the entire community to +1 the same link."

Some questions still going through my head:

Are there perl tutorial sites i do not know about that have good and copious content?

If so, how could we effectively advertise them, so Google picks up on them?

Are there other options i did not think about?





And with that, i close this entry and leave it to you to ponder and provide feedback and most importantly: Help repair the image of Perl.