Your First Program
Start the pico editor from the UNIX command-line and give it a filename to edit:
>pico first.pl
Inside pico, enter the following line or something else your prefer between the double quote marks:
print "Hello World!\n";
Save the file with: <Ctrl> O
Exit pico with: <Ctrl> X
Now run the perl script:
>perl first.pl
Is the output what you expected?
The print command causes the contents that follow it, up until the terminating semicolon, to be sent to the output
file. By default, the output file is your terminal display.
The double quote marks enclose the text to be printed. They don't show up themselves in the output.
The "\n" is a code for a new line which causes the cursor to advance to the start of the next line.
There are several special printing codes which are indicated by a "\" - a backslash - followed by a particular
letter. As used here, the "\" is called an escape character because it causes the character that immediately
follows it be treated specially and not as a normal character.
All Perl commands, under most circumstances, need a terminating semicolon to indicate their ending.