modern_perl_book
modern_perl_book copied to clipboard
Iteration and Scoping section confusing
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.