Im just learning Perl and was a little confused with why I couldnt prevent my subroutines from reading variables from the main program. Here is an example:
use strict;
my $var = 1;
test();
sub test { print $var; }
I had thought that a my variable would not be able to be read by the subroutine, but it can still see it. So my question is how can I prevent subroutines from having access to variables in the main program. Thanks for any help,
Dave
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]