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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

require "script.pl"

Status
Not open for further replies.

snookmz

Programmer
Apr 17, 2001
46
0
0
AU
G'day all

I asked this question a few weeks ago, but didn't get a satesfactory answer :0)

I'm wanting to include some subroutines that i have written in a previous script and include them for use in a new script.. But when i use the 'require "script.pl"' function it executes the script instead of just enabling me to use the subroutines...

Has anyone got any suggestions to help me?? Any help will be grately appreciated, thanks in advance /-------------------------------------
| I always have been, and
| always will be, a newbie :)
\-------------------------------------
 
Can u post the code?

C "Brahmaiva satyam"
-Adi Shankara (788-820 AD)
 
Put the subroutines in a separate file and require it in both the original file and your new program. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top