CougarXR7 has asked for the wisdom of the Perl Monks concerning the following question:
I am trying access the elements in an array.
When the program starts it load from a file, ciphers.
# load the list with ciphers from the config file if no ciphers were detected.$self->load_ciphers() unless $self->check_cipher_count(); $self->{game} = undef;
supportedgames.pl
When I do this, $self->check_cipher_count(); the count is 2 not 7our %S = (%S, game => { "jetfighter4" => {key => "M3pL73", label => "JetFighter + IV: Fortress America"}, "projectigi2r" => {key => "j4F9cY", label => "IGI2: Covert S +trike", port => 26001}, }, ); 1;
I cannot get perl to print anything concerning that array. Always errors, always!
#print Dumper $rx->{game}->1->{label};
#print Dumper $self->{game}->1->{label};
#print Dumper $rx->{game}->[0]->{cipher};
It's like the Perl code does not know that jetfighter4 is JetFighter IV is jetfighter4
Hope someone can help me learn how to access an array in perl!
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Load file (updated)
by AnomalousMonk (Archbishop) on Jul 27, 2019 at 22:57 UTC | |
by CougarXR7 (Acolyte) on Jul 28, 2019 at 12:38 UTC | |
|
Re: Load file
by huck (Prior) on Jul 27, 2019 at 22:06 UTC | |
|
Re: Load file
by Anonymous Monk on Jul 08, 2019 at 19:30 UTC | |
by CougarXR7 (Acolyte) on Jul 08, 2019 at 19:49 UTC | |
by CougarXR7 (Acolyte) on Jul 27, 2019 at 21:24 UTC |