Tony, Your questions about scoping are pretty common ones for beginning Perl users. May I suggest that you pick up a good book, like "Learning Perl"? That will go a long way towards clearing these things up for you.
I'd also suggest reading this document: http://perl.apache.org/docs/1.0/guide/porting.html And I think you'll do better asking your questions on perl-specific forums than on that one you tried before. Take a look at perlmonks.org, or one of the beginner lists shown here: http://lists.cpan.org/ - Perrin