September 2002
Intermediate to advanced
544 pages
13h 6m
English
Before I discuss application architecture further, I want to talk a little bit about programming style. One way you can make your scripts easier to understand is to use a style called declarative programming. Declarative programming, simply defined, involves writing subroutines for all of the discrete tasks in your programs. In other words, rather than writing a long series of code that performs a bunch of different tasks, you write subroutines for each of the individual tasks and call them all in a row.
First, here’s a very short primer on writing subroutines in Perl. Declaring a subroutine is simple:
sub my_subroutine { } That’s it. Unlike Java and C, you don’t have to specify which arguments will be passed to your ...
Read now
Unlock full access