http://qs321.pair.com?node_id=11130089


in reply to Re^3: How to import "global" variables into sub-scripts from main script?
in thread How to import "global" variables into sub-scripts from main script?

Variable "%s" is not imported%s

(S misc) With "use strict" in effect, you referred to a global variable that you apparently thought was imported from another module, because something else of the same name (usually a subroutine) is exported by that module. It usually means you put the wrong funny character on the front of your variable.

I did run across that one earlier in my quest for a resolution, but found it of no use to me--too esoteric and short on detail. I have no idea what the "right" "funny character" should be--or even what a "funny character" is supposed to refer to--the dollar sign, perhaps? What else would one prefix a scalar variable with?

I guess there's no easy answer. Best, in my case, might be just to turn "strict" back off and continue my troubleshooting without its bungling "help." Sorry to have troubled the waters here for nothing.

Blessings,

~Polyglot~

  • Comment on Re^4: How to import "global" variables into sub-scripts from main script?

Replies are listed 'Best First'.
Re^5: How to import "global" variables into sub-scripts from main script?
by marto (Cardinal) on Mar 22, 2021 at 10:06 UTC

    "What else would one prefix a scalar variable with?"

    It doesn't have to be a scalar, it could be something else, for example a hash, so the character before the variable name would be different. For what it's worth I agree this part of the documentation could do with some work to make things clearer.