start page | rating of books | rating of authors | reviews | copyrights

Learning Perl on Win32 Systems

Learning Perl on Win32 SystemsSearch this book
Previous: 8.1 Defining a User Function Chapter 8
Functions
Next: 8.3 Return Values
 

8.2 Invoking a User Function

You invoke a subroutine from within any expression by following the subroutine name with parentheses, as in:

say_hello(); # a simple expression $a = 3 + say_hello() # part of a larger expression for ($x = start_value(); $x < end_value(); $x += increment()) {         ... } # invoke three subroutines to define values

A subroutine can invoke another subroutine, and that subroutine can in turn invoke another subroutine, and so on, until all available memory is filled with return addresses and partially computed expressions. (No mere eight or 32 levels could satisfy a real programmer.)


Previous: 8.1 Defining a User Function Learning Perl on Win32 Systems Next: 8.3 Return Values
8.1 Defining a User Function Book Index 8.3 Return Values