Thanks for the help. The reason it creates @$game is because this sub is used multiple times to create arrays for many different games within the same script.
On second thought, I see why you can call the @maps array within the function because the retruned values are dumped into their own arrays within the script that calls the function.