We have some perl files in strict mode and some not. Some constants (global variables) are defined in a perl library (.pl) in non-strict mode, for example "$XXXX = '....';".
When I tried working on a perl file in strict mode to use such constant/global variable (defined in the non-strict mode perl file), I got a compilation error "Global symbol "$XXXX" requires explicit package name".
I am kind of new to perl. So far it seems to me that package is only available in perl module (.pm) and I cannot add a package to a perl library (.pl) file, is it right?
I guess the best way is to put all constants in a module, but then this requires changing all the files that use constant. Right now we prefer a minimum number of file change. I wonder if there are other ways to work around it while keeping the original strict or non-strict mode?