We'll finish up your lesson on the core of the Perl language today with a discussion of subroutines, functions, and local variables. With subroutines you can collect bits of commonly used code into a single operation, and then perform that operation at different times in your script—the same way you use the built-in Perl functions.
The specific things you'll learn about include
The differences between user-defined subroutines and Perl's standard functions