in reply to data structures
Scalar:
Also, don't post questions just for XP - if you don't have thoughtful questions to ask, then you're gonna get down modded like you have been. I've tried to tell you this in private chat, but apparently you don't understand what I am meaning.
Array:my $scalar = 'abc'; print "$scalar\n";
Hash (aka, associative array):my @array = ('abc', 123, 'dog'); for (@array) { print "$_\n"; }
There are others, but I think if I mention them your head will explode. Master these, then start thinking about combining them into complex data structures such as arrays of arrays, hashes of hashes, etc.my %hash = ( bob => 'dog', sue => 'cat', jim => 'parrot',); for (keys(%hash)) { print "$_ has a $hash{$_}.\n"; }
Also, don't post questions just for XP - if you don't have thoughtful questions to ask, then you're gonna get down modded like you have been. I've tried to tell you this in private chat, but apparently you don't understand what I am meaning.
|
---|
In Section
Seekers of Perl Wisdom