monk2b has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks
I am creating a script using what I think are object oriented coding techniques. I am not able to get hash variables working properly. Could one of you let me know what I am missing here that would make my second print statement work properly.
I am creating a script using what I think are object oriented coding techniques. I am not able to get hash variables working properly. Could one of you let me know what I am missing here that would make my second print statement work properly.
my %BldEnv = ( "TTT2" => { VersionOne => "one", VersionTwo => "two", VersionThree => "three", VersionFour => "four", } ); # commented line works #print "$BldEnv{TTT2}{VersionOne}\n"; # uncommented line doesn't work print "$BldEnv->{TTT2}->{VersionTwo}\n";
I got 99 problems, but a @%$()_ ain't one.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Using OO hash
by moritz (Cardinal) on Nov 27, 2007 at 21:11 UTC | |
by monk2b (Pilgrim) on Nov 27, 2007 at 21:27 UTC | |
Re: Using OO hash
by meraxes (Friar) on Nov 27, 2007 at 21:53 UTC |
Back to
Seekers of Perl Wisdom