On Mon, 20 Aug 2001 [EMAIL PROTECTED] wrote:
> I am confused about how perl provides for separate perl scripts to talk to
> each other. In k-shell I can load a function using . <file_name.ksh>. In
> the file I have defined a function
> function myfunction
> {
>
> I can execute that function from within any k-shell file by simply
> myfunction
>
> How is this done in perl? I read all the doc about subroutines and
> functions but they do not seem to operate the same. An example would be
> nice.
>
> Also, I want any variables defined in one script to be accessible to any
> other script.
I think you are looking for Perl modules, which lets you create a file
with commonly called subroutines and variables and share them amongst
multiple scripts for code re-use.
You'll want to look at
perldoc perlmod
which is documentation on this very topic.
And I really recommend you get a good book on Perl so you can find this
information yourself and have a good reference to prop up in your lap
while you code. _Learning Perl_ is a good start -- a brand new version of
it just came out and one of its authors haunts this very mailing list.
-- Brett
http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
The rule on staying alive as a forecaster is to give 'em a number or
give 'em a date, but never give 'em both at once.
-- Jane Bryant Quinn
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]