Exercises, examples and other material relating to training module P303. This topic is presented on public course
Perl for Larger Projects
Perl for Larger Projects - Objects, huge data, SQL databases, XML, efficiency and other topics.
This advanced course takes the Perl programmer through
... http://www.wellho.net/course/plfull.html [course] |
Here's a Perl / CGI script - a "Common Gateway Interface" program that I want to run on my web server, and access via my browser. What server to I need ... http://www.wellho.net/mouth/2219_Con ... -Perl.html [short article] |
What does addition actually mean? It means different things depending on what you're adding together, and in Perl you can redefine additions - and other ... http://www.wellho.net/mouth/2427_Ope ... ricks.html [short article] |
#!/usr/bin/perl
$k = 1;
lab1:
print $k++,"\n";
($k http://www.wellho.net/resources/ex.php4?item=p303/go1 [code sample] |
#!/usr/bin/perl
# Purpose: while / continue
open (HOSTS,"/etc/hosts") || die "host file
problem\n";
while ($inline = ) {
chop $inline;
... http://www.wellho.net/resources/ex.php4?item=p303/hoco [code sample] |
#!/usr/bin/perl
# variable scope
%demo = ("Monday"=>4,"Tuesday"=>5);
subz::first_level();
print "Completed\n";
################################################
... http://www.wellho.net/resources/ex.php4?item=p303/owncheck [code sample] |
#!/usr/bin/perl
print "please enter command ";
chop ($in = );
$r = `$in`;
print $r;
print "finished\n"; http://www.wellho.net/resources/ex.php4?item=p303/mudemo [code sample] |
If you're going to be using Perl in depth every day, this module covers some golden nuggets and extra syntaxes that you might have been looking for. There's a rule of thumb with Perl Ð "If you're finding something more difficult than you expected, there's probably an easier way".
This topic is presented on public course
Perl for Larger Projects
Examples from our training material
| asp | Command line options to add implicit read loop and split |
| cmc.pm | Defining a subroutine prototype |
| dob | uses of "do" |
| go1 | The goto statement ... if you must ... |
| go2 | goto based on a value - a sort of switch |
| go4 | Goto an array of possibilities |
| hoco | the continue block |
| mudemo | running an operating system command |
| mudemo2 | Testing to see if a variable is tainted |
| owncheck | Use of caller and wantarray |
| spt3 | A subroutine prototype defined too late |
| spt4 | A subroutine prototype defined in time |
| sptest1 | Using a prototyped method correctly |
| sptest2 | Using a prototyped method incorrectly |
| sudemo | Operation that will fail if run tainted |
Background information
Some modules are
available for download as a sample of our material or under an
Open Training Notes License for free download from
http://www.training-notes.co.uk.
Topics covered in this module
Checking calling sequences.
Trust.
Checking yourself.
Subroutine prototypes.
Examples.
Where am I?.
Which file? Which line of that file?.
Goto Statements.
The unconditional goto.
The "computed" goto.
goto a subroutine.
Do and continue.
continue blocks.
do statements.
Command line options.
Tainted Perl.
How does tainting work?.
How do I tell if a scalar is tainted?.
Untainting information.
Other special variables.
Special Lists.
Special Hashes.
Special Scalars.
Special file handles.
Special subroutines.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our
Listing and schedule page.
Well House Consultants specialise in training courses in
Python,
Perl,
PHP, and
MySQL. We run
Private Courses throughout the UK (and beyond for longer courses), and
Public Courses 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. Also
available is the Opentalk
Forum for discussion of technical questions.