Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat should I teach a beginning Perl programmer?
    text
    copied!<p>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. </p> <pre> use warnings; use strict; # use A_CPAN_LIB; sub example_func1 { # use the CPAN lib or demonstrate some basic feature of Perl } example_func1(); # ... __END__ </pre> <p><hr> Here's what I came up with...<br></p> <h2>Where to Start</h2> <p>Believe it or not, the man pages. Ok, we'll just use perldoc instead to be Windows friendly.</p> <p>The perldoc pages (or man pages on Unix/Mac) are excellent for Perl. You can type man perl or perldoc perl</p> <p><strong>perldoc perl</strong>; # Show an overview and dozens of tutorials; man perl is the same.<br></p> <p><strong>perldoc perlintro</strong>; # A Perl intro for beginners; man perlintro<br> <strong>perldoc perlrequick</strong>; # An example Perl regex tutoral<br></p> <p><strong>perldoc perlfunc</strong>; # Shows builtin Perl functions<br> <strong>perldoc perlre</strong>; # More Perl regex.<br></p> <h2>CPAN</h2> <p>There are thousands of libraries on the Perl library site CPAN.<br> <strong>perl -MCPAN -e 'install DateTime'</strong><br></p> <p>perldoc works for installed modules too: perldoc module<br></p> <p><strong>perldoc DateTime</strong><br> <strong>perldoc DBI</strong>; # Database API. If this doesn't work then install it:<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>perl -MCPAN -e 'install DBI'</strong></p> <h2>Recommended Modules</h2> <p><strong>perl -MCPAN -e 'install Moose'</strong>; # Perl does OOP<br> <strong>perldoc Moose</strong>; # Tell me more about the Moose<br> <strong>perl -MCPAN -e 'install CGI'</strong>; # Quick and dirty web pages<br> <strong>perl -MCPAN -e 'install Catalyst'</strong>; # Big web framework. Sometimes have problems installing. Google is your friend<br> <strong>perl -MCPAN -e 'install CGI::Application'</strong>; # Another web framework<br> <strong>perldoc CGI::Application</strong>; # Take a quick look at the docs<br> <br> A little Q&amp;A.<br> <br> Q: Why should I use Perl instead Ruby or Python?<br> A: More people use Perl. There are more libraries for Perl(way more). Perl is a really great GTD language.<br> <br> Q: Why do people hate Perl?<br> 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. <strong>perl -c</strong> hello.pl<br></p> <p><br></p> <h2>Perl Topics</h2> <h3>Using Perl with Databases</h3> <p><a href="http://www.perl.com/pub/a/1999/10/DBI.html" rel="nofollow noreferrer"><a href="http://www.perl.com/pub/a/1999/10/DBI.html" rel="nofollow noreferrer">http://www.perl.com/pub/a/1999/10/DBI.html</a></a> <br></p> <h3>Using Perl for Web Development</h3> <p><a href="http://www.catalystframework.org" rel="nofollow noreferrer"><a href="http://www.catalystframework.org" rel="nofollow noreferrer">http://www.catalystframework.org</a></a> <br></p> <h3>OO Perl</h3> <p><a href="http://www.iinteractive.com/moose" rel="nofollow noreferrer"><a href="http://www.iinteractive.com/moose" rel="nofollow noreferrer">http://www.iinteractive.com/moose</a></a> <br></p> <h3>Perl 1-Liners</h3> <p><a href="http://www.perlmonks.org/?node_id=470397" rel="nofollow noreferrer"><a href="http://www.perlmonks.org/?node_id=470397" rel="nofollow noreferrer">http://www.perlmonks.org/?node_id=470397</a></a><br> <a href="http://sial.org/howto/perl/one-liner" rel="nofollow noreferrer"><a href="http://sial.org/howto/perl/one-liner" rel="nofollow noreferrer">http://sial.org/howto/perl/one-liner</a></a> <br></p> <h3>Other Tutorials</h3> <p><a href="http://perlmonks.org/index.pl?node=Tutorials" rel="nofollow noreferrer"><a href="http://perlmonks.org/index.pl?node=Tutorials" rel="nofollow noreferrer">http://perlmonks.org/index.pl?node=Tutorials</a></a></p> <h2>Books</h2> <p>There are dozens.<br> <a href="http://www.amazon.com/s/ref=nb_ss_gw?url=search-alias%3Dstripbooks&amp;field-keywords=perl&amp;x=0&amp;y=0" rel="nofollow noreferrer">http://www.amazon.com/s/ref=nb_ss_gw?url=search-alias%3Dstripbooks&amp;field-keywords=perl&amp;x=0&amp;y=0</a><br> <br></p> <h2>Websites</h2> <p><a href="http://perlmonks.com" rel="nofollow noreferrer">Perlmonks</a><br> <a href="http://www.perl.org" rel="nofollow noreferrer">Perl.org</a><br> <a href="http://pleac.sourceforge.net" rel="nofollow noreferrer">Pleac</a><br> <a href="https://stackoverflow.com/questions/161872/hidden-features-of-perl">StackOverFlow's Hidden Features of Perl</a><br> <a href="http://www.cpan.org/misc/cpan-faq.html" rel="nofollow noreferrer">CPAN FAQ</a><br> <a href="http://www.stonehenge.com/merlyn/LinuxMag" rel="nofollow noreferrer">Randall Schwartz's articles</a><br> <br> <br></p> <h2>Getting Help</h2> <p><a href="http://www.nabble.com/Perl-f13578.html" rel="nofollow noreferrer">Perl Nabble Forum</a><br> IRC Channels: freenode, irc.perl.org. There are several:<br> <br> irc://irc.perl.org/perl<br> irc://irc.perl.org/catalyst<br> irc://irc.freenode.net/modperl<br> irc://irc.perl.org/perl6<br></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload