in reply to Re: Perl Module Problems
in thread Perl Module Problems

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.

Replies are listed 'Best First'.
Re^3: Perl Module Problems
by davidov0009 (Scribe) on Sep 23, 2006 at 19:58 UTC
    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.
      Bingo! When dealing with the maps of multiple games, you may want to consider a Hash of Arrays (HoA).
      my %maps; foreach my $game (qw( cstrike ... )) { $maps{$game} = [ MAP::get_game_maps($game) ]; }