Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Include subs from different perl file

by perllove (Beadle)
on Jun 07, 2007 at 04:24 UTC ( [id://619728]=note: print w/replies, xml ) Need Help??


in reply to Include subs from different perl file

As the philosophy of perl goes you have several ways to do this.

1. Compile the code into module and call it using 'use' then you can use the name of the subroutine as just its in your code.

2. One more way than using the use statement is to include it in the @INC array, with the following syntax push "scriptname.pl", @INC

3. one more simple way to do is to use include or require statement

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-03-28 20:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found