Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
go ahead... be a heretic
 
PerlMonks  

Re: dripping wet rank perl newbie ?:

by Wookie (Beadle)
on Jul 23, 2001 at 09:14 UTC ( [id://98942]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to How to make a module which exports a function, takes a list and returns a list?

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:
#!/usr/bin/perl -w sub my_sub { code..... } 1;
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);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://98942]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.