Exercises, examples and other material relating to training module P203. This module is presented on Private Courses
and Specially Run Courses
Want to just click on a Perl program's icon and have it run? Want to simply type in the name of a file at the command prompt and have your operating system know it's a Perl program? This module tells you how. You'll also learn how to check the syntax of your program without running it, and how to get extra warnings out in the process if your code isn't "clean".
Related technical and longer articlesParrot - Perl's new Virtual Machine
|Articles and tips on this subject||updated|
|2876||Different perl examples - some corners I rarely explore|
The private Perl course that I ran on Wednesday through Friday of last week was a little out of the ordinary as we were concentrating far more that usual on a wide variety of practices that may be found - either in legacy code or advanced recent code. Great fun for me, and plenty of new examples.
|1865||Debugging and Data::Dumper in Perl|
I'll admit it - I'm not a great fan of debuggers, preferring to write well structured code, and check it out with a few test / intermediate print statements. You'll often find I code:
$trace and print (something);
in Perl, and this allows me to add a line
|748||Getting rid of variables after you have finished with them|
If you've finished with a variable in your program, you can usually just leave it "in situe" and it will be destroyed and the memory it occupied will be released when you exit from your program. In many languages, variables within named blocks of code have an even shorter "shelf life" - by default, a ...
|328||Making programs easy for any user to start|
If you write a program in Perl, your colleague writes a program in Tcl/Tk and your company runs an open source program that's written in Python, how do your users ensure that they get the right interpretter to run the program? You certainly don't want them to have to remember to type something like:
|743||How to debug a Perl program|
Have you every written a Perl program that doesn't perform as you would wish? Yes, everyone who's written a Perl program has done that. Once any syntax errors have been corrected, you run your program for the first time and you check - VERY carefully - the results. Any errors, and the patterns of errors, ...
Examples from our training material
|assume|| Perl assumes empty variables|
|d2|| Prompt, read, chop and echo with comments, warnings and POD documentation|
|rw2|| read, calculate, print results (2)|
|rw3|| Calculate, using a module|
|symbols.pm|| Package used within simple perl example|
PicturesThe best way to learn is to listen and then to try
Some modules are available for download
as a sample of our material or under an Open Training Notes License
for free download from [here]
Topics covered in this module
Integrating Perl with your computer.
Unix and Linux - Path, chmod and the #! line.
Windows NT, 2000, ME, 98 and 95 - associating files with Perl.
Running Perl on the Macintosh and on the PC under MS-DOS.
Compilers, interpreters and Perl.
Checking your syntax, and getting warning messages.
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule
Well House Consultants specialise in training courses in
. We run
throughout the UK (and beyond for longer courses), and
at our training centre in Melksham, Wiltshire, England.
It's surprisingly cost effective to come on our public courses -
even if you live in a different
country or continent to us
We have a technical library of over 700 books on the subjects on which we teach.
These books are available for reference at our training centre.