Introduction to Perl (2008/2009)

alt Universitat Pompeu Fabra

Synopsis Introduction_to_Perl_2008_2009.pdf

Evaluation

First partial evaluation: 15th October 2008

Last partial evaluation: 3nd December 2008 at 2PM

Project deadline: 15th December 2008 at 1PM

Resources

Classes

Please be sure that you have Linux working on your laptop and perl functional. open a terminal and type: perl -e 'print "Hello\n"' Did it print hello on the screen? Fine you are set. Otherwise, you probably don't have perl installed. Try to install it.

important note: Exam and project weightings can't be modified from what the syllabus says. It's 40% exams and 20% the project.

Codes

Somebody asked how to print a matrix.

sub print_matrix {
  my $ref = $_[0];
  for (my $i = 0; $i < 3; $i++) {
    print "@{${$ref}[$i]} \n";
  }
}

my @B = ([1,2,3],[4,5,6],[7,8,9]);
print_matrix( \@B);

master/PER (last edited 2008-11-10 16:45:04 by gianni)

Copyright 2008. All rights reserved.