Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: using a subroutine

by mpeg4codec (Pilgrim)
on Aug 09, 2004 at 17:58 UTC ( #381314=note: print w/replies, xml ) Need Help??


in reply to using a subroutine

Looking very good! It's a little redundant to pass the two arguments to directs() separately. You have the right idea with the foreach (@_) in the subroutine. Just pass the options like this:
&directs($home, $lib);
Remember, the rule for learning how to program is ``Read a lot, code a little, read a lot, code a little.'' Always keep experimenting. Good luck!

Replies are listed 'Best First'.
Re^2: using a subroutine
by xjlittle (Beadle) on Aug 09, 2004 at 23:51 UTC
    I tried this way and it only read the last argument, $lib. However I may very well have missed something in the code that would cause both to be read. I like your philosophy though!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://381314]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2016-09-28 10:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (525 votes). Check out past polls.