Summary

This chapter presented the details of writing your own functions in Perl. We discussed the topics of passing arguments to subroutines and returning values from subroutines. Then we discussed Perl libraries, which are files of Perl subroutines. One of these libraries, the Standard Perl Library, ships with all Perl distributions. We also discussed various issues regarding where variables can be accessed within a program. This discussion included topics such as local, my, and the package statement. Finally, we discussed the occasional need to write your own function to alter the behavior of a standard function.

Get Programming PERL in the .NET Environment now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.