print @$arrayref;
Declaration scope of 'my' in the non-sub{} file: Whole file inside one package.
-Declaration scope of 'my' in sub{}: Only this sub{}, not accessible by callees.
+Declaration scope of 'my' in sub{} or block {}: Only in { }, not accessible by callees.
Declaration scope of 'local': This sub{} and globally for all callees.
* Perfect for some nesting counters:
my $func_nest=0;
}
* Built-in variables cannot be 'my' scoped, use 'local' instead
Declaration scope of 'our'(5.6.0+) or 'use vars...': Global across packages.
-(These scoping rules are IMO simplified but works4me.)
+(These scoping rules are simplified but works4me.)