..


Sponsored Links

The first time with Perl

Article written by Max Bossi

In this first tutorial on Perl will try to understand the basic guidelines governing the language through a simple example.
Specifically, we will create a small program in Perl that has as its purpose to write on the screen the words "Hello world!".
This is the content of our little program:






 #! / Usr / bin / perl







 print "Content-type: text / html \ n \ n";







 print "Hello world!"



In the first line (#! / Usr / bin / perl) should indicate the physical path necessary to achieve the perl interpreter on our servers (if you do not know this value, please contact the server administrator will certainly indicate that there that location).
In the second row has been declared the type of document, and finally, the last line, we asked our server to print to video the phrase "Hello world!".

Now you need to save our small program as a file. PL (eg ". Prova.pl").
The next step is to load our file "prova.pl" on the server, but do we have to follow a few tips: remember to make the transfer in ASCII mode and, after sending, to set (CHMOD command of our FTP software) permission to "prova.pl" to 755.

Now we can run the file on your browser and enjoy the results of our first application in Perl.

In the same category ...
E-Learning
Linux (Course) Linux (Course)
Complete guide to open-source system. From 49 €.
MySQL (Course) MySQL (Course)
Management of open-source database. From 39 €.
PHP (Course) PHP (Course)
Full course for creating dynamic Web sites. From 49 €.
Sponsored Links