Hello, Just want to ensure my understanding about Perl basics is solid. In order to do that, I have a few questions to be cleared up front.
1) Since a hash defined in the main part (outside the subroutines) of a program can be accessed from anywhere (from all subroutines), is it fine, in regards to security or even code elegancy, if we define a hash in the main part? An advantage with defining in the main part is there's no need to pass it as an argument while calling a subroutine. But is that the right method? 2) Is it advisable to use 'our', except with package, to define a variable in the main part (as this can be done with 'my')? I would also like to know the security concerns with our', that what are the issues if we define a scalar variable with 'our' instead of 'my'. 3) Also, am I correct in guessing that the memory that's used to allocate a variable defined with 'my' will be freed up once the current lexical scope is exited? -- Regards, Akhthar Parvez K http://Tips.SysAdminGUIDE.COM UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity - Dennie Richie -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/