In addition to the previous comments, (pay close attention as both ELISHEVA and Corion helped part a few clouds for me on this same topic), you should definitely spend time reading : Variable Scoping in Perl: the basics and the article it was inspired by Coping with Scoping. If you want to get a little more knowledge on name spaces and scoping, and you should, read Lexical scoping like a fox and perlfaq7 under (What's the difference between dynamic and lexical (static) scoping? Between local() and my()?) Although these may not seem to be within the scope of your question they are closely related as ELISHEVA demonstrates above.
I've seen it written a few times and will paraphrase here that * "Until you understand contexts in Perl you will be miserable." Please do not underestimate the importance of this subject. A lot of things will make much more sense once you get a handle on this area.
* Name spaces is not the only area you'll hear about contexts, ie: list and scalar context.Good luck!
UPDATE: Added the asterisk note on context in Perl.
In reply to Re: Packages and Modules
by luis.roca
in thread Packages and Modules
by Sary
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |