Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Firstly, "isn't working" is a totally inadequate error report: you need to post the error messages you are getting. If you're not getting any error messages, add use strict; and use warnings; near the start of your code. If you don't understand the messages, also add use diagnostics; for more verbose messages. Here's the basic syntax for pushing onto a simple and a complex array:
You'll note the absence of any ->[] in the above code. You have another problem in your push line above. Compare how you've written $self{"Course(s)"} here with how you've written it everywhere else. I hope that's enough for you to resolve the problem yourself. If not, post your error messages and describe what parts you're having difficulty with. Finally, there's all sorts of problems with your example push:
Something like the following skeleton code would be better:
-- Ken In reply to Re^3: Nested Data Structures, OOP
by kcott
|
|