Day 11. Creating and Using Subroutines

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

  • How to define and call simple subroutines

  • Using variables local to subroutine definitions

  • Returning values from subroutines

  • Passing arguments to subroutines

  • Using subroutines in different contexts

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset