Questo tutorial permette di ripassare passo passo i fondamenti di Perl. Suggeriamo a chi si sente meno sicuro di fare questo tutorial in classe, mentre per gli altri può essere utile farlo a casa come ripassino.
Questo tutorial permette di ripassare passo passo i fondamenti di Perl. Suggeriamo a chi si sente meno sicuro di fare questo tutorial in classe, mentre per gli altri può essere utile farlo a casa come ripassino.
This short tutorial is to remember how to read a file from Perl. You should remember that it’s a two steps strategy:
MySQL has its own shell. We can enter using the following command:
mysql -h servername -u username -p
Where “servername” can be omitted if we installed MySQL in our computer. The prompt switches from “$” to “mysql>” and we can type SQL commands.
We want to:
Here you are the code of our very first script we made in lesson1:
#!/usr/bin/perl $yourname = 'George'; print "Hello world!\n"; print "and hello $yourname too!\n"; |
Remember that if you want to add comments they should be preceded by the # character. The very first line is an instruction for the shell rather than for Perl, but at the moment just remember to add it.
Each instruction has to end with a “;”.
\n is the special way to add a new-line.
Do you remember the difference between double quotes and single quotes?
HTML is the very simple language to format web pages. We used HTML as a first use of “simple text” files and our text editor.
Here i report a simple example very similar to the one covered during the first lesson.
<html> <body> <h1>Hello World!</h1> <p>My first paragraph. Another <strong>great</strong> paragraph!</p> </body> </html> |
If you want to test some HTML code without having to create a new text file you can try this website.