The above links posted definitely answer your question so I won't be redundant. I might strongly suggest Oreilly's programming perl book (or even learning perl) as being not only very good reference manuals, but most important give the reader a really tremendous insight into foundation concepts of programming, such as issues with scoping.