Tag Archives: tutorial

Lab02/3: first steps with Perl

This post is a part of the second laboratory session. Please refer to the main post. 

Ready to start programming? We hope so. This post will teach you the very first things 🙂

What a Perl program is

As we already said in class, a Perl program (or script, better), is a plain text file, as a FASTQ or SAM file is. It contains a set of instructions that the computer can execute. Unlike human beings, computers love repetitive tasks…

We are going to give you an actual lesson of Perl next Friday, but we think it is a good idea to make you touch it in advance.

Every programming language has:

  • variables: basically they are a piece of memory that can store an information, and has a name.
  • conditionals: we execute an instruction IF some condition is verified.
  • loops: we execute a set of instruction as many times as needed. Example: for every sequence in a FASTA file, calculate the reverse complement and print it.

Continue reading

Tagged , , ,