in reply to Multiple 'use vars' lines
Now two interesting points from the documentation:
use vars predeclare global variable names (obsoleted by our())
and...
An `our' declares the listed variables to be valid globals within the enclosing block, file, or `eval'. That is, it has the same scoping rules as a "my" declaration, but does not create a local variable. If more than one value is listed, the list must be placed in parentheses. The `our' declaration has no semantic effect unless "use strict vars" is in effect, in which case it lets you use the declared global variable without qual ifying it with a package name. (But only within the lexical scope of the `our' declaration. In this it differs from "use vars", which is package scoped.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: Multiple 'use vars' lines
by tilly (Archbishop) on Mar 21, 2001 at 03:55 UTC |