So you want to learn Perl
- Recommended (but optional) start: get familiar with your command line
- Many tutorials will suggest running interactive perl commands or starting a debugger from a command line or shell
- In Windows, this means getting familiar with the "Command Prompt"; in OS X the Terminal app in Utilities; and in *nix, your default shell or console app.
- At a minimum, you'll probably want to know how to: list files, change directories, start a program, and stop a program that's running
- To check if a version of perl is installed and in your default search path, run the command line: "perl --version"
- Download and install Perl
- Windows: the recommended install is ActiveState's ActivePerl; it includes a special tool called ppm to install prebuilt perl modules without requiring any additional development tools (e.g. C compilers for custom extensions). An alternative approach would be to install Cygwin (a Linux-like environment for Windows) and use the cygwin setup to install perl. Note that Cygwin and ActivePerl use different environments so you cannot mix and match installers; any modules generally have to be installed separately for each environment.
- OS X: perl is included in the default installs of OS X 10.3 (Panther) and OS X 10.4 (Tiger), and periodic updates are provided by Apple in the normal Software Update process. The recommended setup is to use the default installed perl, unless you have specific need of a newer version. Other options include ActivePerl as well as building from source.
- Linux: perl is generally included in the default setup. The recommended install or upgrade is via your Linux environments' package management system, eg "emerge" on Gentoo. Another less common option is ActivePerl .. generally you will have an easier time installing additional modules using the default package management system. A fuller explanation on using the Perl CPAN module repository with your Linux package management system is available in the Hints and Tips
- Make sure you can run Perl from the command line by typing:
- Note: A modern and recommended version of perl is 5.10.1 or greater, however any version from 5.6.x onward would be suitable to learn on.
- Make sure you have a text editor that can save plain text (you may wish to have a look at some of the text editor alternatives on the developer tools page.
- Note: Do not be tempted by any of the fancy IDE's and similar tools that are available until you are comfortable with programming and debugging Perl. You are far better off with a simple editor and a command line prompt in the first instance. The Perl debugger is built into Perl itself.
- Get some tutorial reading matter, for instance:
- Review the Learn Perl and Perl Begin websites
- Read perlintro and peruse the FAQs;
- Download Introduction to Perl or one of the other freely available course notes from Perl Training Australia;
- Review the Perl Monks Tutorials section;
- Locate one of the other many Perl texts on the Net, e.g. Programming:Perl from the Wikibooks:Programming languages bookshelf;
- Check out The Perl Monk guide to "Where and how to start learning Perl"
- Get a good Perl book -- look at the links on the Perl book reviews page for some suggestions.
- Hack away!
- Ask for help when you get stuck
- Browse the Internet for information
- Look at the Next steps page