Here is the basic perl program that we'll use to get started.
#!/usr/local/bin/perl # # Program to do the obvious # print 'Hello world.'; # Print a messageEach of the parts will be discussed in turn.
#!/usr/local/bin/perlalthough this may vary from system to system. This line tells the machine what to do with the file when it is executed (ie it tells it to run the file through Perl).
Everything else is a Perl statement which must end with a semicolon, like the last line above.
You may find the above program produces an slightly unexpected result. So the next thing to do is to run it.