in reply to strange responses to inhouse perl training

Instead of teaching the group how to use perl you should consider taking one programmer aside and tutoring them. After you see what works in that context, put together a new presentation.

I would also stay away from discussing best practices such as using qx() instead of ``, and save that for after they are up and running. It would also be wise to have them all read Perl Best Practices - but again, after they understand the basics.

As they are coming from stricter languages it is a very fair question to ask about the difference between single and double quotes. In some languages that difference is used for creating a string, or for a single character. I agree with your supervisor - don't teach alternative quoting. It just isn't important enough at this point.

Above all make sure you teach them to always use strict and warnings. They will feel more comfortable if the language doesn't overdo the DWIM behaviour.

Take this as an opportunity to expand your own knowledge by teaching others. There are countless things that everyone "knows", but that they do not know how to explain. Discovering how to explain them often teaches you a great deal.

  • Comment on Re: strange responses to inhouse perl training

Replies are listed 'Best First'.
Re^2: strange responses to inhouse perl training
by imp (Priest) on Aug 23, 2006 at 23:02 UTC
    I would start them out with lists, arrays, and simple constructs like foreach. Keep your examples concise and avoid anything that looks magical, or you will reinforce whatever stereotypes they have heard about perl golfing, and they will focus on the trees and miss the forest.

    An example for foreach

    # Basic example my $sum = 0; foreach my $number (1,2,3,4,5) { $sum = $sum + $number; } # A little better foreach my $number (1..5) { $sum += $number; } # Probably shouldn't show this one $sum += $_ for (1..5);

    I would stay away from showing them map or grep initially unless you're dealing with someone with lisp experience.