© William "Bo" Rothwell of One Course Source, Inc. 2020
W. ". RothwellPro Perl Programminghttps://doi.org/10.1007/978-1-4842-5605-3_3

3. Advanced Features

William “Bo” Rothwell1 
(1)
San Diego, CA, USA
 

Consider this chapter a collection of useful advanced tips to help you create better Perl programs. Each section will begin with a brief description of why you should use the feature or tool, followed by more detailed examples.

Use my iterator variables with for loops

Why

This technique makes it clear that the iterator variable is scoped, that is, not available outside of the for loop. It also prevents subroutine calls from accidently modifying your iterator variable, and it prevents compile time error messages while using the strict pragma.

Consider the ...

Get Pro Perl Programming: From Professional to Advanced 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.