in reply to Re: perl global vars in subroutines
in thread perl global vars in subroutines

Well, first of all, if the perlmod.pm file starts with package Me;, it's not going to work. The our $global_1; in the main file will refer to $main::global_1;, while the our $global_2; in the module refer to $Me::global_1;.

But if you don't use a package statement, and have everything in the main package, and you aren't using parameters to pass arguments to subroutines, there's little reason to use strict and our.

Abigail