Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: using a subroutine

by mpeg4codec (Pilgrim)
on Aug 09, 2004 at 17:58 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://381314]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-18 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found