in reply to Re^3: problem with global variables going out of scope
in thread problem with global variables going out of scope

I guess you're right.
I didn't bother testing without use strict and this could would fail if it was in effect.

However, this might be considered either a perl bug or a documentation glitch as perlfunc reads:

"our" associates a simple name with a package variable in the current package for use within the current scope. When "use strict 'vars'" is in effect, "our" lets you use declared global variables without qualifying them with package names, within the lexical scope of the "our" declaration. In this way "our" differs from "use vars", which is package scoped.

Unlike "my", which both allocates storage for a variable and associates a simple name with that storage for use within the current scope, "our" associates a simple name with a package variable in the current package, for use within the current scope. In other words, "our" has the same scoping rules as "my", but does not necessarily create a variable.


acid06
perl -e "print pack('h*', 16369646), scalar reverse $="