#include equivalent?

Discussion in 'Perl' started by Hagar, Jul 23, 2003.

  1. Hagar

    Hagar Guest

    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, Jul 23, 2003
    #1
    1. Advertising

  2. Hagar

    Hagar Guest

    On Wed, 23 Jul 2003 22:12:19 -0500, DelphiDude wrote:

    > On Tue, 22 Jul 2003 23:51:47 -0500, Hagar wrote:
    >
    >>
    >> 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

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



    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
    Hagar, Jul 25, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark
    Replies:
    2
    Views:
    1,107
  2. dee

    #include equivalent for aspnet

    dee, Aug 14, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    638
  3. (Pete Cresswell)
    Replies:
    2
    Views:
    483
    Eric B. Bednarz
    Nov 6, 2004
  4. Andreas Bogenberger
    Replies:
    3
    Views:
    903
    Andreas Bogenberger
    Feb 22, 2008
  5. Weston C
    Replies:
    16
    Views:
    212
    Lasse Reichstein Nielsen
    Jan 25, 2004
Loading...

Share This Page