in reply to Design a Perl training day

One thing I would definitely include is how to find and select modules appropriate for the task (involving CPAN, checking out the module and asking around on sites like perlmonks). This should be new terrain to the C++ guys at least (AFAIK).

Also there should be a question geared toward showing the advantage of using 'foreach' or 'map' to using 'for (;;)'. While JavaFan got a point about TMTOWTDI, using for(;;) on a fixed array is just not using the power of perl

And you should show them the power of hashes (if they not already know that). Using hashes is what differentiates intermediate perl programmers from beginners

Replies are listed 'Best First'.
Re^2: Design a Perl training day
by GrandFather (Saint) on Mar 30, 2011 at 11:41 UTC

    Yes, those are very much elements that I had in mind and good confirmation that my initial ideas aren't too far off the mark.

    CPAN will get coverage, but most of these people are accustomed to using the Boost library which provides some inoculation against the "ain't written here" syndrome that often mitigates against using resources like CPAN. Probably I'll use Getopt::Long as an example module - something that's pretty much immediately useful and easy to understand and use.

    Using for in for (;;), for (x .. y) and for (@array) variants to compare and contrast the different usage modes for for loops was definitely one item on the list of topics to cover.

    The power of hashes is indeed another "must cover" topic.

    True laziness is hard work
Re^2: Design a Perl training day
by raybies (Chaplain) on Mar 30, 2011 at 13:03 UTC

    I agree with the suggestions above. Hashes, especially, change the way you think about data.

    Regex in Perl is pure gold too, and could take months to teach if you went into any amount of detail.

    One thing I'd do is teach how to get information in Perl. Not just CPAN (though that's a great suggestion cuz there's so much to do), but perldoc, and just how simple it is to formulate a quickie test program. I'd think that perltut would be a decent place to start.

    For me, I use Perl most often, not to build a massive production piece of software, but just to automate the environment and the data generated by the legacy systems I'm consigned to maintain. So getting text/arguments/pipes/sockets/data into my program and doing something quick with it, etc... is very useful to me. Perl's so nice in that way. I also love how Perl handles References--the hash of hash (of etc.) is a beautiful thing.