Yes, modules are it. Here is an example...
require 'plibs.pm';
plibs::cat("readme.txt");
---
then in the module
---
package plibs;
use strict;
sub cat
{
my $file=shift(@_);
my $data;
open(IN, "$file") or die $!;
while(<IN>) {$data.=$_;}
close(IN);
return $data;
}
1;
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 25, 2002 4:15 PM
Subject: #include or similar
> I'm looking for an equivalent to C's #include or shell's . in perl, and I
> can't find it. Can anyone tell me how to include a second file at runtime
> without writing a module?
>
> If writing a module is the only way to do it, can someone give a a very
> simple example of a module?
>
> Andrew Clark
> 90East (Asia Pacific) Pty Ltd
> Canberra, Australia
>
>
> 02 6272 3700 (switch)
> 02 6272 3010 (facsimile)
>
>
> [EMAIL PROTECTED]
> www.90East.com
>
>
> **********************************************************************
> Notice: This e-mail may contain personal information as defined in the
> Privacy Act 1988, or confidential information. Please do not disclose
> personal information in this e-mail, other than that of the sender, to
> another party without the consent of the sender. If you are not the
> intended recipient, or believe that you have received this e-mail in
error,
> please do not print, copy, retransmit, disseminate, or otherwise use the
> information. Also, please notify the sender that you have received this
> e-mail in error, and delete the copy you received. Thank you.
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]