Go Back   Velocity Reviews > Newsgroups > PERL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

PERL - #include equivalent?

 
Thread Tools Search this Thread
Old 07-23-2003, 05:51 AM   #1
Default #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
  Reply With Quote
Old 07-25-2003, 12:47 AM   #2
Hagar
 
Posts: n/a
Default Re: #include equivalent?

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 Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump