Re: export variables



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't
know which functioncall I should use for it. Peng is using "require",
is this the standard way for importing a file?
snip

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.
.



Relevant Pages

  • Re: subroutine stack and C machine model
    ... C99 *is* the C Standard. ... Evaluation order is an implementation decision. ... but are you the autistic twerp to whom you are referring? ...
    (comp.lang.c)
  • Re: Is microprocessor an integrated circuit???
    ... <severe snip mode on> ... standard clearly defining a byte as not necessarily being eight bits. ... > what does ibm have to do with the official ... THe processor is not a microprocessor. ...
    (sci.electronics.design)
  • Re: subroutine stack and C machine model
    ... The Standard ... who's read Schildt, not the Standard. ... Most compilers have left to right evaluation as it happens. ...
    (comp.lang.c)
  • Re: newbe and problems with sintax
    ... Carriage control applied to a processor-dependent set of units; ... What, pray tell, was standard about carriage control? ... in PDF format! ...
    (comp.lang.fortran)
  • Re: add a rudder to a kayak?
    ... >> views on kayaks and rudders. ... <snip blather> ... You mean there's no women that prefer driving standard? ... >> free to pose it. ...
    (rec.boats.paddle)