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

Re: Using subroutine between scripts

by asarih (Hermit)
on Nov 07, 2003 at 16:22 UTC ( [id://305345]=note: print w/replies, xml ) Need Help??


in reply to Using subroutine between scripts

You should definitely put it in a module. That's what code reuse is for; when you want to tweak the subs, you only have to do it once. @INC always include ., so you can put the module file in the same directory as the scripts themselves. If your scripts exist in many directories, then you could do use lib qw[ /module/dir /more/module/dir]; to tell perl to look in the correct directory.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-19 05:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found