our

our associates a simple name with a package variable in the current
package for use within the current scope. When usestrict'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 usevars
, 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.

If more than one value is listed, the list must be placed
in parentheses.

An our declaration declares a global variable that will be visible
across its entire lexical scope, even across package boundaries. The
package in which the variable is entered is determined at the point
of the declaration, not at the point of use. This means the following
behavior holds:

Multiple our declarations with the same name in the same lexical
scope are allowed if they are in different packages. If they happen
to be in the same package, Perl will emit warnings if you have asked
for them, just like multiple my declarations. Unlike a second
my declaration, which will bind the name to a fresh variable, a
second our declaration in the same package, in the same scope, is
merely redundant.