Regular expressions - I don't want to do too much detail here now.
Subroutines!
** crucial ** concept in programming : break the problem
into pieces, and make smaller programs to do those pieces.
Continue until the pieces are so small that they're simple.
subroutines as "verbs"
Perl syntax: sub SUBNAME {block}
scope of variables - "my" for local ones
global variables with "our"
(or the older "use vars qw{@foo $bar %blatz}")
input parameters in perl with the special array "@_"
make a copy of the variables !
return values vs side effects
recursion: a really nifty trick
template :
# Does blah blah blah
# Usage: $result = jims_example(2,3);
sub jims_example {
my ($this, $that) = @_;
my $answer;
# .... do some stuff to find $answer from $this and $that.
return $answer;
}
Examples - fixing "debug" stuff in older programs
Jim Mahoney
(mahoney@marlboro.edu)
Last modified <% scalar localtime($m->current_comp->load_time) %>