Something like this:
UPDATE: In my zest to copy the original code, I made a mistake in my code below. Thanks Laurent_R for pointing it out in the node below. Corrected code follows:
# your initial definitions here # maybe a loop starts here my $student; # single student my @students; # all students in 1 class $student = { studentName => 'John', studentSurname=>'Something', studentID=>'9534', age=>'12' }; push @students, $student; # Eliminate loading next student below explicitly # by using a loop to read from source file, DB, etc. $student = { studentName => 'Mary', studentSurname=>'Something2', studentID=>'5489', age=>'13' }; push @students, $student; %classroom = ( classroomID => 10, classroomName => 'classroom1', students => \@students ); # Rinse, repeat
In reply to Re: Array of structures within an array of structures.
by VinsWorldcom
in thread Array of structures within an array of structures.
by atu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |