> Ok, maybe I should restate the problem. I have a bunch of scripts
> which have a couple of lines that chuck some configuration stuff into
> some variables. I'm sick of editing the scripts each time the config
> changes. I realise that I could use a modules and do stuff like:
>
> $path = &Conf
Subject: Re: #include or similar
26/02/2002
;
return $data;
}
1;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 25, 2002 4:15 PM
Subject: #include or similar
> I'm looking for an equivalent to C'
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
lto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 4:15 PM
To: [EMAIL PROTECTED]
Subject: #include or similar
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 modul
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 (