i just went through this last week.
put a line at top of file to be included like;
package Util;

at end of file put:
1;

name the file Util.pm

to include it in another file say:
use Util;

assume a subroutine in included file called 'foo'.
to call it:
&Util::foo();

this is the simple version of a module. no bells.



On Monday, February 25, 2002, at 04:15  PM, [EMAIL PROTECTED] wrote:

> I'm looking for an equivalent to C's #include or shell's . in perl, and I
> can't find it.  Can anyone tell me how to include a second file at runtime
> without writing a module?
>
> If writing a module is the only way to do it, can someone give a a very
> simple example of a module?
>
> Andrew Clark
> 90East (Asia Pacific) Pty Ltd
> Canberra, Australia
>
>
> 02 6272 3700 (switch)
> 02 6272 3010 (facsimile)
>
>
> [EMAIL PROTECTED]
> www.90East.com
>
>
> **********************************************************************
> Notice: This e-mail may contain personal information as defined in the
> Privacy Act 1988, or confidential information. Please do not disclose
> personal information in this e-mail, other than that of the sender, to
> another party without the consent of the sender. If you are not the
> intended recipient, or believe that you have received this e-mail in 
> error,
> please do not print, copy, retransmit, disseminate, or otherwise use the
> information. Also, please notify the sender that you have received this
> e-mail in error, and delete the copy you received. Thank you.
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to