Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reusable "modules"?

Status
Not open for further replies.

CJason

Programmer
Joined
Oct 13, 2004
Messages
223
Location
US
I have a few scripts that, upon starting to run each, basically all load some variables/hashes/etc... from a text file and then continue with processing. I would like to take this "loading of data from a text file" and make a module out of it that can be "called" from all these scripts...instead of having duplicate code all over the place. I'm thinking of it kind of like a subrouting/function in another file...like in other languages like C, etc... Can this be done in perl? If so, can anyone give me some ideas on how to do it?

Thanks in advance!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top