Exercises, examples and other material relating to training module P216. 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] |
Custom course - Custom course
Custom course
This is a custom course that will be tailored to your trainee's needs
and based on their current knowledge ... http://www.wellho.net/course/ccfull.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] |
So often you'll be working within a program in seconds - elapsed times, delays, that sort of thing - but want to report times back to the user in terms ... http://www.wellho.net/mouth/765_Perl ... conds.html [short article] |
Time isn't the easiest unit on which to do arithmetic, and dates expressed as a human-readable string are quite tricky to sort. Just imagine trying to ... http://www.wellho.net/mouth/454_Time ... -Perl.html [short article] |
#!/usr/bin/perl
$current = `date`;
print "Current date and time is $current";
$day = `date +%A`;
print "Today is $day"; http://www.wellho.net/resources/ex.php4?item=p216/dt3 [code sample] |
Was 8 p.m. on 28th February in Los Angeles before or after 8 a.m. in Tokyo on 1st March? Perl has a very neat trick to handling dates and times, meaning that such questions can be easily resolved. We'll show you that trick, and we'll show you the various functions that you can use to handle dates and times in Perl.
This topic is presented on public courses
Perl Programming,
Perl bootcamp
Examples from our training material
| chivvy | Using %SIG to timeout keyboard entry |
| dante | Date and time demos |
| dt1 | file last modified (days ago) |
| dt2 | dt2 - file last modified (seconds from 1.1.1970) |
| dt3 | current date and time (system dependent!) |
| dt4 | use of time and localtime |
| dt5 | compare a stated date and time with now! |
| hf | Modified "chivvy" - perhaps less OS dependent |
| sigint | Use of Signals in Perl to trap ^C (Control C) |
| tim | Converting times between epoch seconds and regular time |
Pictures
Perl - a modern language for ancient languages
Background information
This module is available under an
Open Training Notes License for free download from
http://www.training-notes.co.uk.
Topics covered in this module
So far.
File status operators.
stat on a file.
Via system commands.
How Perl handles dates and times.
Other date information available.
Convertors.
Convert from epoch seconds into "human readable" form:.
Convert from human readable form to epoch seconds.
Handling centuries.
Elapsed time sleep.
alarm.
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.