Roman Daszczyszak wrote: > > What is the scope of a variable that is declared at the top of a > file using 'my'? > I had thought that this would just make a variable that is scoped to > the entire file, yet 'local' does not localize the variable in a > subroutine, even though it (local) according to what I've read will > 'save a global variable's value and reset it back upon the variable > going out of scope'. That sounded exactly like the behavior I was > after, yet it did not work. According to the error, 'local' does not > work on lexically scoped variables.. so what other kinds of scoping > are there? I only know of using 'my' to declare variables (which are > scoped to the current block (which I understand) and are lexically > scoped (which I don't)) because it's required by 'use strict'.
Perhaps this will help explain better: http://perl.plover.com/FAQs/Namespaces.html John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>