What should I teach a beginning Perl programmer?

I am going to spend 30 minutes teaching Perl to an experienced programmer. The best way to learn Perl is by writing code. In addition to CPAN, what would you show a programmer so they would understand the expressiveness of Perl, the amount of functionality provided by CPAN, while keeping everything clean and tidy so they walk away comfortable with the language? I'll save the tricky stuff for another day.

use warnings;
use strict;
# use A_CPAN_LIB;

sub example_func1 {
  # use the CPAN lib or demonstrate some basic feature of Perl
# ...

Here's what I came up with...

Where to Start

Believe it or not, the man pages. Ok, we'll just use perldoc instead to be Windows friendly.

The perldoc pages (or man pages on Unix/Mac) are excellent for Perl. You can type man perl or perldoc perl

perldoc perl; # Show an overview and dozens of tutorials; man perl is the same.

perldoc perlintro; # A Perl intro for beginners; man perlintro perldoc perlrequick; # An example Perl regex tutoral

perldoc perlfunc; # Shows builtin Perl functions perldoc perlre; # More Perl regex.


There are thousands of libraries on the Perl library site CPAN. perl -MCPAN -e 'install DateTime'

perldoc works for installed modules too: perldoc module

perldoc DateTime perldoc DBI; # Database API. If this doesn't work then install it:          perl -MCPAN -e 'install DBI'

Recommended Modules

perl -MCPAN -e 'install Moose'; # Perl does OOP perldoc Moose; # Tell me more about the Moose perl -MCPAN -e 'install CGI'; # Quick and dirty web pages perl -MCPAN -e 'install Catalyst'; # Big web framework. Sometimes have problems installing. Google is your friend perl -MCPAN -e 'install CGI::Application'; # Another web framework perldoc CGI::Application; # Take a quick look at the docs A little Q&A. Q: Why should I use Perl instead Ruby or Python? A: More people use Perl. There are more libraries for Perl(way more). Perl is a really great GTD language. Q: Why do people hate Perl? A: You can do some ugly stuff with it. Remember use warnings; use strict; in all of your code. You can check your code before running it. perl -c hello.pl

Perl Topics
Using Perl with Databases


Using Perl for Web Development


OO Perl


Perl 1-Liners

http://www.perlmonks.org/?node_id=470397 http://sial.org/howto/perl/one-liner

Other Tutorials



There are dozens. http://www.amazon.com/s/ref=nb%5Fss%5Fgw?url=search-alias%3Dstripbooks&field-keywords=perl&x=0&y=0


Perlmonks Perl.org Pleac StackOverFlow's Hidden Features of Perl CPAN FAQ Randall Schwartz's articles

Getting Help

Perl Nabble Forum IRC Channels: freenode, irc.perl.org. There are several: irc://irc.perl.org/perl irc://irc.perl.org/catalyst irc://irc.freenode.net/modperl irc://irc.perl.org/perl6


We wrote a whole book on that called Learning Perl. Check out the table of contents.

This book is a product of teaching people Perl since 1995. It's not geared to any particular application, and shows people the parts of Perl that they'll use for 80% of their Perl programming. We updated it for Perl 5.10, and include sections on using CPAN.

Good luck, :)

Need Your Help

Converting an Excel formula to C

c excel-formula

I'm trying to convert the following formula to C but failing to get the correct syntax. Basically, I'm using todays date minus a set of defined dates to see if the mod remainder matches a rotation ...

Disable messages in SQL2008 result set

sql-server sql-server-2008 dataset messages

further to these two questions, is there a way to disable the messages that may get sent along with the resultset in SQL2008?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.