http://www.perlmonks.org?node_id=72704


in reply to Re: NEWBIE Brain Teaser #2, by nysus
in thread NEWBIE Brain Teaser #2, by nysus

As for Part B, which asks "why?"...reading perlsub will give you a better understanding of how to pass variables to a subroutine. If you scope :-) it out very closely you may be able to figure out the answer to Part B. However, if you have a copy of "Learning Perl" by merlyn handy, you may get a friendlier explanation for what this bit of code does.