Re: export variables
- From: chas.owens@xxxxxxxxx (Chas. Owens)
- Date: Sun, 30 Dec 2007 10:52:05 -0500
On Dec 30, 2007 6:29 AM, jwaixs <jwaixs@xxxxxxxxx> wrote:
snip
I just want to split up a big file into smaller parts. But I don'tsnip
know which functioncall I should use for it. Peng is using "require",
is this the standard way for importing a file?
The require function is one of the standard ways of including code
from another file. The use function (which uses require, but does a
few other things) is another. You can also get similar functionality
from the do function, but that is generally not a good idea.
Just breaking up a large file into many small ones is a bad idea,
especially if you are sharing variables between the files. If your
program is too large then try to break some of the functionality out
into modules instead. Keep each module independant of the others and
the main program. This will make it easier to make changes later and
you may even find that you can reuse some of the modules in other
projects. You can read more about modules in perldoc perlmod or
http://perldoc.perl.org/perlmod.html.
.
- References:
- export variables
- From: jwaixs
- Re: export variables
- From: Patmarbidon
- Re: export variables
- From: Jwaixs
- export variables
- Prev by Date: Re: export variables
- Next by Date: Re: Handling errors when working with files
- Previous by thread: Re: export variables
- Next by thread: Re: thumbs nails of file
- Index(es):
Relevant Pages
|