![]() |
Perlaccess : Tutorials : Subroutines Calling Subroutines (5.1) by Jacob A. Wheeler http://www.bigresources.com |
|
Subroutines will make your life so much easier once you start implementing them into your code. They allow you to not only seperate different functions from others, but they allow you to call any of the functions whenever you want. Which means it doesn't matter what order all your code is in. You can call a subroutine that's located at the end of your script if you want it to be the first thing executed! To get you familiar with how subroutines look, I have created some sample code below:
Checkout Feeding Subroutines to learn howto pass variables to a subroutine from a subroutine call. |