|
Introduction to Perl First of all, I would like to explain the very first line found in every perl program. Example:
This line tells the server what to do with the file when it is executed. The location to your server's Perl program can vary. Check with your server administrator for the correct path to Perl. Comments can be inserted into a program with the # symbol. Anything from the # to the end of the line is ignored by perl. When stretching comments over several lines, use a # symbol on each line. Everything else is a Perl statement (or code) which must end with a semicolon. If a statement does not end in a semicolon, perl will encounter run-time errors. Example:
Lets examine this program a little. Line 1 tells the server what to do with the file. Line 2 is a comment.
Line 3 has a Output:
Hello world.
Published by: Thomas Penwell Initially published on: June 16, 2011 Article last modified on: Thursday, January 26, 2012. |
||||||||
