Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact

Tips and short articles on this subject
Out of memory during array extend - Perl
A few of my favourite things
Perl - Subs, Chop v Chomp, => v ,
Environment variables in Perl / use Env
Stable sorting - Tcl, Perl and others
Perl - a list or a hash?
-> , >= and => in Perl
(Perl) Callbacks - what are they?
What is a callback?
Conventional restraints removed
Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Perl module P211
Hashes
Exercises, examples and other material relating to training module P211. This topic is presented on public courses Perl Programming, Perl bootcamp

Learning to program in Perl / Perl Programming - Programming Perl - for newcomers to the language This course introduces you to the Perl programming language. ...
http://www.wellho.net/course/ppfull.html  [course]
Learning to Program in Perl / Perl Programming - Learning Perl - whether you're new to programming or 'converting'. This course covers programming in the ...
http://www.wellho.net/course/lpfull.html  [course]
Perl Bootcamp - The fundamentals of the language. This course covers the fundamentals of the Perl programming for computer professionals who are new to ...
http://www.wellho.net/course/bpfull.html  [course]
In most programming applications, you'll write code that calls system functions or subroutines - for example, you'll write a program that reads data from ...
http://www.wellho.net/mouth/738_-Per ... they-.html  [short article]
If I say use Env;, Perl loads in a module which allows me to access all my environment variables directly within my code, by name. If I add an explicit ...
http://www.wellho.net/mouth/1705_Env ... e-Env.html  [short article]
When you write a program, you're usually providing the filling for a sandwich. At the top level, you have the operating system and the compiler or interpreter ...
http://www.wellho.net/mouth/386_What ... back-.html  [short article]
During courses, I end up writing a lot of short demonstrations to show particular features of a language - this week, it's a Perl Programming Course so ...
http://www.wellho.net/mouth/1826_Per ... mp-v-.html  [short article]

A hash is a collection of scalars, but each element can be named rather than numbered as it would be in a list. This makes it similar to a database table in many ways and leads to some truly remarkable capabilities.

This topic is presented on public courses Perl Programming, Perl bootcamp

Examples from our training material
account   Sample - extracting statistics from an access log file
acl   Sample answer - web_c2, page 152
bankout   initialising a hash
cbdemo   How sort callbacks work
env2   ENV module to import variables as globals
envrep   use of %ENV
h1   Setting up, adding to, changing a hash (associative array)
ha1   Setting up, then displaying contents, of a hash
hash1.pl   setting up and using a hash
nip2   set up and loop though a hash in various ways
nip3   the danger of jumping out of an each loop
nip4   Sorting the keys of a hash
niports   hash - manipulation
pathit   List out all programs on the current $PATH
peeps.pl   Set up a hash of people
so2   Sort using your own sort subroutine
so4   sort using a more complex routine
so5   sorting with a comparison block
sorter   Demonstration of default dort order
stdhash   keys must be unique - example illustrates the problem
stdhash3   Hash keys must be unique - so make up a new keu
stdhash4   Keys must be unique - design new keys, add accessor loops to find multiple keys
sthash2   Keys must be unique - solution 1 - Append all possible values
ukports   fill and look up a hash
web_count   Sample answer - web access counter question 1
webc2   Sample answer - 2nd question
Pictures
Everyone's concentrating on the exercise
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
Setting up a hash.
Accessing a hash.
Individual elements.
The whole hash.
Processing every element of a hash.
Keys and values.
Each.
Ordering a hash (sorting).
Sorting using your own subroutine for comparison.
Operators cmp and <=>.
A more complex sort selector routine.
Sorting with a comparison block.
Programming techniques.
Non-unique keys.
Looking for matching keys.
Use hashes for stock numbers.
Deleting elements, clearing out hashes.
Initialising hashes.
Special hashes.
%ENV.
Summary.
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.


© WELL HOUSE CONSULTANTS LTD., 2009: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho