#include equivalent?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hagar

    #include equivalent?

    This question has probably come up a zillion times, but a search of this
    group and Google has been somewhat ambiguous.

    Is there a source "include" available for Perl, or a macro statement like
    in assembler? I assume that there is not, at least by that topic, since I
    can find nothing on the subject in my books.

    I would assume that some Perl projects are fairly large and scrolling up
    and down dozens or hundreds of screens trying to find that subroutine
    would get old fairly fast.

    It is easy enough to build a source joiner using several methods, but
    being very new to Perl I was just wondering what the pros use to break up
    their projects into managable pieces?

    Hagar


  • Hagar

    #2
    Re: #include equivalent?

    On Wed, 23 Jul 2003 22:12:19 -0500, DelphiDude wrote:
    [color=blue]
    > On Tue, 22 Jul 2003 23:51:47 -0500, Hagar wrote:
    >[color=green]
    >>
    >> Is there a source "include" available for Perl, or a macro statement like
    >> in assembler? I assume that there is not, at least by that topic, since I[/color]
    >
    >
    > Yep, there are several ways, but look up the keyword "require", as in
    >
    > require "./myprog.pl";
    >
    > Remember that this is a scripting language, not an assembler where you can
    > tack on includes at the end. You need to require the program before you
    > use it.
    >
    > DD[/color]


    Thanks man! That worked. It is obvious that require is not exactly an
    include and has some stuff that I don't understand yet, but it is close
    enough. Thanks again.

    Hagar

    Comment

    Working...