in reply to What am I doing wrong here?

You have use strict at the top of your script. This is a good thing - in fact it is an excellent thing: it will catch many common mistakes. One thing it will stop you doing is using globals. This is another good thing, so I won't tell you how to circumvent it - instead you should look at why you are using a global and see if there is a better way of doing it. You are passing the variable to the function in the other package so you might not need it to be global. If you want to share the variable between packages look up the our keyword in your documentation.

-- iakobski