Some suggestions in this thread: Best solution to Julia's soft scope problem? - #5 by tim.holy
(probably there should be a warning at the very start of the Julia manual telling people to never, ever, use the global keyword, until you know the language enough to fully understand that it is unavoidably needed. The best advice is to never use it, there is almost always a better way to do things without it).