in reply to declare/initialize variables at bottom of script?
Initializing you could do somewhere else, but declaration must happen before you attempt to use them. Either via 'my' declaration at the top of your script, or you could perhaps import them from a module. In neither case can you declare variables at the 'bottom' but you could do so at the top of a short module as a separate piece of code.