![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: dripping wet rank perl newbie ?:by Wookie (Beadle) |
on Jul 23, 2001 at 13:14 UTC ( [id://98942]=note: print w/replies, xml ) | Need Help?? |
If you're having trouble with module logic - there is a pretty straight forward way to import subs without making it a module. If you create a file containing your sub-routine (say called mysub.pl) something like: Then in your program simply: require mysub.pl; that will include that sub in that program for you. I don't know whether this is the most efficent way to do it - and you do lose the ability to hide variables etc. - but it is probably worth a try :). game(Wookie,opponent) eq 'Wookie' ? undef $problem : remove_limbs(arms,opponent);
In Section
Seekers of Perl Wisdom
|
|