Category Archives: tutorial

A gentle tutorial

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.

Continue reading

Reading a text file from Perl

This short tutorial is to remember how to read a file from Perl. You should remember that it’s a two steps strategy:

  1. Open the file (that means connect to it)
  2. Read the file line-by-line (with a while loop)

Continue reading


Bash slides

Screenshot 2014-04-03 13.59.43We published an on-line version of the slides used today to introduce some fundamental command you’ll routinely use during the practicals.

Bash slides

MySQL: first commands into the shell

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:

  • list the databases
  • select a particular database
  • list the tables in that database
  • list the fields of a table

Perl: Hello World!

Here you are the code of our very first script we made in lesson1:

$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?


Tagged ,

HTML: Hello World!

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.

<h1>Hello World!</h1>
<p>My first paragraph. Another <strong>great</strong> paragraph!</p>


If you want to test some HTML code without having to create a new text file you can try this website.

Tagged ,