Don't ask to ask, just ask | |
PerlMonks |
Re: Returning Values from Subroutinesby mojobozo (Monk) |
on Sep 06, 2002 at 14:51 UTC ( [id://195660]=note: print w/replies, xml ) | Need Help?? |
Hey there. I'm not entirely sure why it's not working as is as I am but a novice, but the following works for me:
As far as the original not working, will the initial sub ("main") even run without a call to it? I tried running it with a call for it and got an error. Also, in the the "add" sub, you are returning $answer, but it was never assigned a value in the sub. Anyone else want to chime in? I'd like to hear more on this one as well. mb++ was hoping to get first return, but was beat out by six minutes... curses!
In Section
Seekers of Perl Wisdom
|
|