Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > #include equivalent?

Reply
Thread Tools

#include equivalent?

 
 
Hagar
Guest
Posts: n/a
 
      07-23-2003
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


 
Reply With Quote
 
 
 
 
Hagar
Guest
Posts: n/a
 
      07-24-2003
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57