# exercise 1.1 by erikt(at)science.uva.nl The task was to run an age calculator program and to check if its output is correct. First I stored the program in a file: erikt@stuwww:~$ cat > 11.pl # age calculator print "Please enter your birth year "; $yearOfBirth = ; chomp($yearOfBirth); print "Your age is ",2007-$yearOfBirth,".\n"; ^D Then I tested the program with three birth years erikt@stuwww:~$ perl -w 11.pl Please enter your birth year 1943 Your age is 64. erikt@stuwww:~$ perl -w 11.pl Please enter your birth year 0 Your age is 2007. erikt@stuwww:~$ perl -w 11.pl Please enter your birth year 2008 Your age is -1. The program does not always get it right as the first test shows. The year entered was the birth year of John Denver (b. 31-12-1943). * The answer 64 is wrong because John Denver died at the age of 53 * Even if Denver was alive, he would be only 63 today (Autumn of 2007) and not yet 64