Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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!


Comment on Re: using a subroutine
Download Code
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 having an uproarious good time at the Monastery: (14)
As of 2015-07-31 21:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (282 votes), past polls