The distinctive Perl camel is (c) O'Reilly
Perl Workshop Home Page
Home of the Bioinformatics Perl Workshop perl workshop > courses > introduction to perl (1.0.1.8) > Lists, Arrays and Context (.3/8) > iteration (.c2)

course 1.0.1.8

Level: beginner
1.0.1.8.3
Introduction to lists and arrays; manipulating arrays; scalar vs array context. BCCRC Lecture theatre.

legend

course code

cat.course.level.sessions.session

e.g. 1.0.1.8

categories

0 | introduction and orientation

1 | perl fundamentals

2 | shell and prompt tools

3 | web development

4 | CPAN Modules

5 | Ruby

levels

level: all all ( 0 )

level: beginner beginner ( 1 )

level: intermediate intermediate ( 2 )

level: advanced advanced ( 3 )

[ use while/until and if/unless to draw attention to positive/negative conditions ]

lecture code viewer

downloads

Code
Lists, Arrays and Context
Lists, Arrays and Context
Martin Krzywinski
#!/usr/local/bin/perl # new line at the end of each print, automatically $\ = "\n"; @x = (1..5); # iterate over indices for $i (0..4) { print qq(This is the ${i}th element : $x[$i]); }

3 | Lists, Arrays and Context | 1.0.1.8.3

1.0.1.8.3.p1 | Lists, Arrays and Context | Martin Krzywinski | ppt
1.0.1.8.3.c1 | grow | Martin Krzywinski | code
1.0.1.8.3.c2 | iteration | Martin Krzywinski | code
1.0.1.8.3.c3 | pop | Martin Krzywinski | code
1.0.1.8.3.c4 | push | Martin Krzywinski | code
1.0.1.8.3.c5 | swap | Martin Krzywinski | code
1.0.1.8.3.a1 | Lists, Arrays and Context | Martin Krzywinski | pdf
1.0.1.8.3.s1 | Lists, Arrays and Context | Martin Krzywinski | slides