http://perl.plover.com/FAQs/Namespaces.html
The first "my" holds for the whole block (the whole file in this case). The second instance of "private" is only available inside "sub1" and not deeper than "sub1", aka not in "sub2". Read the article, it explains it much better than I can. http://danconia.org chris wrote: > I am surprise that a private variable is accessible by a sub. Consider > this > > my $private = new $class; > &sub1 ($private); > > sub1{ > (my $private) = @_; > &sub2; > } > > sub2{ > $private->dothis; #??? > } > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]