I need it to go through each element in the @game array and create an array named @maps_gamename based on the elements ont the array. However I keep receiving the following errors telling me I left semicolons off, I did not. Errors:#!/usr/bin/perl5 use strict; use warnings; use diagnostics; # Load Module use HLDS; my @games=qw( cstrike dod czero gearbox ricochet dmc tfc valve ); foreach my $game (@games) { my @maps_$game = HLDS::GameMaps("$game"); }
Scalar found where operator expected at 6.pl line 14, near "@maps_$gam +e" (#1) (S) The Perl lexer knows whether to expect a term or an operator. + If it sees what it knows to be a term when it was expecting to see an operator, it gives you this warning. Usually it indicates that an operator or delimiter was omitted, such as a semicolon. Scalar found where operator expected at 6.pl line 14, near "@maps_$gam +e" diagnostics::warn_trap('Scalar found where operator expected a +t 6.pl line 14, near "@...') called at 6.pl line 14 (Missing operator before $game?) (Missing operator before $game?) diagnostics::warn_trap('\x{9}(Missing operator before $game?)\ +x{a}') called at 6.pl line 14 syntax error at 6.pl line 14, near "@maps_$game " Global symbol "%class" requires explicit package name at 6.pl line 14. Execution of 6.pl aborted due to compilation errors (#2) syntax error at 6.pl line 14, near "@maps_$game " Global symbol "%class" requires explicit package name at 6.pl line 14. Execution of 6.pl aborted due to compilation errors. diagnostics::death_trap('syntax error at 6.pl line 14, near "@ +maps_$game "\x{a}Global symb...') called at 6.pl line 16
In reply to Re^2: Perl Module Problems
by davidov0009
in thread Perl Module Problems
by davidov0009
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |