Now I want for $student{$student_id} to be a reference to an array of references to the key/value pair stored at $catalog{$course_number}.
I don't see the need for that. Why not just store the key in the array and then use that to look up the value from %catalog whenever you need it?
push @{$students{$student_id}}, $course_id; # ... then to retrieve later ... for my $cid (@{$students{$student_id}}) { print "Course ID $cid, Tutor: $catalog{$cid}{tutor}\n"; # or whate +ver }
In reply to Re: How to make a reference to a hash cell
by hippo
in thread How to make a reference to a hash cell
by ibm1620
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |