Perl Monk, Perl Meditation | |
PerlMonks |
Howto return a reference of an array of custom class?by true_atlantis (Acolyte) |
on Sep 05, 2007 at 17:00 UTC ( [id://637206]=perlquestion: print w/replies, xml ) | Need Help?? |
true_atlantis has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to write a function that returns an array reference of 'mat::Network' objects. But the returned array doesnt seem to be what im expecting. The error seems to be thinking im trying to call something on 'Main' not 'mat::Network' Example:
will return: Undefined subroutine &main::p What am i doing wrong? I feel like I have to cast '$_' as 'mat::Network'? Thanks in advance.
Back to
Seekers of Perl Wisdom
|
|