O'Reilly logo

Sams Teach Yourself Perl in 21 Days, Second Edition by Rafe Colburn, Laura Lemay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Going Deeper

Subroutines are fairly basic concepts that don't involve a large amount of depth in Perl. Nonetheless, there are a few concepts that aren't discussed in this lesson, which are summarized here.

The definitive description of Perl subroutines, because my is an operator, more information about it can also be found in the perlfunc man pages (although we'll also talk more about it on Day 13). See those pages for further details on any of the concepts described in this section.

Local Variables in Blocks

I've made a point of referring to local variables in this section as being defined inside subroutines, and local only as far as those subroutines are running. In reality, local variables can be defined to be local to any enclosing block, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required