Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))

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 P202
Perl Fundamentals
Exercises, examples and other material relating to training module P202. This topic is presented on public courses Perl Programming, Perl bootcamp, Learning to program in Perl, Perl Programming

A review of the Perl basics, suitable for a newcomer to Perl who's converting from another language, and also for trainees who have never programmed before but have studied our earlier modules. This module covers writing, storing and running programs, using variables, and calculations. It also introduces string and numbers, and how Perl converts between them

Articles and tips on this subjectupdated
4324Learning to program - variables and constants
Further material from our "learning to program in ...." courses ... an introduction to variables and constants variable basics Information - data - needs to be stored in a program between statements. Or rather it needs to be stored in the computer's memory. At the lowest of levels, that's a binary ...
3917BODMAS - the order a computer evaluates arithmetic expressions
What order does a computer program use to evaluate expressions? If I write   2 + 3 * 4 + 5 does it start off, left to right ...   2 + 3 is 5   5 * 4 is 20   20 + 5 is 25 No! it does not, even though the newcomer might think that was the most natural way for ...
3574Perl functions such as chop change their input parameters
Typically, functions / named blocks of code take a series of operands / parameters as inputs, and return a result which is saved into another variable - here's an example in Perl:   $size = length($persname); Incoming value - read from $persname Action defined in - length Outgoing value - ...
3542What order are operations performed in, in a Perl expression?
Mathemetical operators in Perl aren't simply performed left to right - very early on your Learning to Program in Perl course you'll learn that multiplications and divisions happen before additions and subtractions, and you'll learn that brackets (also know as terms or lists) happen even earlier. Commonly ...
3398Perl - making best use of the flexibility, but also using good coding standards
Sometimes, examples written during a course are throw-aways ... but at other times they become a useful addition to our resources. On a private private Perl course that I was running yesterday, and continues today and Monday, I found myself writing a useful piece that shows examples of lots of ways of ...
3329Perl from basics
It's refreshing to teach Perl to a class of bright but brand new programmers, which I'm doing in Edinburgh this week. For a class on novices really make me think "why" at some of the aspects us old hacks take for granted. And - yes - I'm delighted to step back to the basics and explain. Along these ...
3278Do I need to initialise variables - programming in C, C++, Perl, PHP, Python, Ruby or Java.
Starting with a clean slate. Are variables initisialised, and if so, how? Even with this fundamental question, languages vary considerably. C and C++ From my (e)mailbag ... """In a piece of code we’ve written we declare an array, but we do not fill the elements with values, we assume (dangerous ...
3102AND and OR operators - what is the difference between logical and bitwise varieties?
Many modern programming languages have two operators for "or" and two for "and" - described as "bitwise" and "logical" operators. And you need to choose the right one in the right circumstances ... otherwise your code won't behave quite as you expect. Bitwise OR takes the internal bit pattern of the ...
3059Object Orientation in an hour and other Perl Lectures
I enjoy the occasional course that's different in its design and specification, and yesterday was one of those - more lectures that training, on intermediate and advanced Perl, for a group of eight delegates who were all well experienced at PHP, but Perl "dabblers" to this point. During the day, we ...
2876Different 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. Here ...
2832Are you learning Perl? Some more examples for you!
One of the things that you'll get on a Well House Consultants course is new code written by the tutor in front of your very eyes. We do that because: • you need to learn not only how code works, but also the though code process behind the code - not only how it is written in a ceratyin way but ...
1946Variable Types in Perl
In Perl, you have "autovivification" where variables are created when they have a values set in them, without the need to declare them. Some authorities will tell you that they are also "autotyped" in that Perl knows what to store in them automatically too, and to some extent that's true ... but the ...
2442Variable storage - Perl, Tcl and Python compared
From Monday to Wednesday, I was teaching Python to a group of delegates at a company where I have previously taught Tcl and Expect and Perl. And this interesting diagram shows just what a contrast there is between the three languages right from the start - in terms of how data is stored into variables! In ...
1826Perl - Subs, Chop v Chomp, => v ,
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 those examples are in Perl. Some interesting Perl facts ... a) The => operator can be used to replace the , ("the equals, greater than can be used ...
1448Question on division (Java) - Also Perl, PHP, Python ...
Q: What's the difference between % and /? A: / returns the result of a division % returns the remainder when you do a division. Divide 18 by 7 you get 2, with a remainder of 4 (i.e. 4 left over). so 18/7 give 2, and 18%7 gives 4. And from Tcl/Tk and Expect... you can see the float v integer considerations ...
1726Hot Courses - Perl
It feels like a heatwave! Or rather "summer has come to the UK". We were doing some sums on today's private course in East Anglia, which is running at the customer's office with some 16 delegates (far more than on our public courses, where the limit is 8) so that made 17 of us in the room, plus ...
1312Some one line Perl tips and techniques
I'm running a Perl Course this week ... a small group, so we can look at some very interesting constructs that I wouldn't normally cover / consider on a public course. Comment out a block of code with an impossible condition if (1 == 0) { .... This is a great way to temporarily comment out a whole ...
184MTBF of coffee machines
Updated - see end of story REAL coffee. Mmmmmm. Ever since we started running courses here, we've provided customers with superb coffee. Grind the beans as required, brew the coffee with freshly heated pure water and supply a choice of sugars and sweeteners for those who want such things. Our first ...
748Getting 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 ...
Examples from our training material
ages   compare two ages
av2   average of 2 ages, shows precedence and string to number conversions
average   Calculate and print average of 2 ages
bmi2   First Practical Program - including comments and documentation
bod   Precedence of operators
chopin   Read from user, write to screen WITH FAULT
codemo   Coercion - i.e. silent data type conversion
couple   reads two names and echos them
greeting   prompt and read user input
hello   "Hello World"
hello_again   Performing one action after another - a sequence of statements
language   Perl language fundamentals - example
mfrp   Plan ahead - write the comments first
one_line   two names are echoed back on one line
poor   A program that does something unexpected
read_write   Read a value, calculate, output an answer
rw2   Using chop to get rid of the newline
wrong   A program with a syntax error
yikes   chop - altered incoming value and returned value
Perl is a powerful, modern scripting language
Delegate - Perl class, Dharhan
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 [here].
Topics covered in this module
First Perl program.
Comments and documentation.
Executable statements.
Print statement.
Variables and assignments.
Reading data.
File handles.
Read from operator.
Strings v numbers.
String operators.
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 Ruby, Lua, 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.

You can Add a comment or ranking to this page

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

PAGE: http://www.wellho.net/resources/P202.html • PAGE BUILT: Sun Oct 11 14:50:09 2020 • BUILD SYSTEM: JelliaJamb