Perl Tutorials - Herong's Tutorial Examples
Dr. Herong Yang, Version 5.00

User Defined Subroutines

This chapter provides tutorial examples and notes about user defined subroutines. Topics include parameters are passed as aliases of the original variables; parameters are received in local array variable @_; list value can be returned from a subroutine; a subroutine can be called in many ways.

Declaring and Calling Subroutines

SubParamList.pl - Example on Parameter List

SubParamAlias.pl - Example on Parameters as Alias

SubReturnValue.pl - Example on Return Values

SubCalling.pl - Example on Calling Formats

Dr. Herong Yang, updated in 2008
User Defined Subroutines