Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Set of scripts using same variables

by tcf22 (Priest)
on Mar 15, 2004 at 17:31 UTC ( #336760=note: print w/replies, xml ) Need Help??


in reply to Set of scripts using same variables

If they are configuration vars, then I would go with rinceWind's suggestion of the Config::* modules.

If you have groups of scripts with that same piece of code, you can just stick it in a common script an require it.

Script1.pl
require 'common_stuff.pl'; &common_function;

common_stuff.pl
sub common_function(){ #...code goes here... }

- Tom

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2020-06-04 18:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (35 votes). Check out past polls.

    Notices?