in reply to Basic Print statement question

Depends on what you mean by "global" and "local", since perl doesn't really have those categories. Perl does have lexical (declared with "my" and, in 5.10, "state") and package (declared with "our", "use vars", or "local") variables. Package variables are sometimes called "global" variables, but file-scoped lexical variables sometimes are too. I don't know which you mean.

For variables of the same name, whichever was most recently declared in the lexical scope will be what's used, whether by print or anything else, when you just say $variable. (Where "declared" means via "my", "state", or "our".)

You can explicitly get a package variable by qualifying with the package name it was declared in, where the default package is "main" (with the empty string as an alias). So $main::var (aka $::var) will get the package variable, even if $var is a lexical at that point in your code.

I hope this helps you at least enough to rephrase your question.