Your question is highly open to interpretation
based on the situation/problem to be solved.
Personally I would still avoid using
our variables, but in some situations I wouldn't hesitate to use a handful of
my variables directly underneath
use strict; use warnings;
Also, if these global variables are constant for the duration of the script's running lifetime, then you might consider using
use constant or
use Readonly::XS
Or, if you have complete control over this code, restricted hashes might be a suitable fit. Essentially you would declare a hash in your most outer scope, then using the
Hash::Util module's
lock_hash() and
unlock_hash() subroutines whenever you need to modify or "make constant" your global variables...
Disclaimer: This is just my opinion, and others may disagree with these approaches.