modern_perl_book icon indicating copy to clipboard operation
modern_perl_book copied to clipboard

Iteration and Scoping section confusing

Open dagolden opened this issue 10 years ago • 0 comments

A Perl newbie on my team was thrown by the examples in the Iteration and Scoping section relating to the topic_mangler function.

The topic_mangler function in the top example is very different than the bottom one: the bottom takes an argument whereas the top one does not (and the top loop doesn't pass an argument). The bottom one has a confusing comment about # was $_ = shift but that line doesn't appear in any other example.

I spent some time scratching my head trying to figure out what the section was trying to illustrate and then translate it effectively for the newbie, so if I'm confused, it probably needs a re-write.

dagolden avatar Jul 14 '14 01:07 dagolden