ot;;
our $foo;
print $foo; #get 'abcd'
bar(); #get the subroutine defined in the 'user.rules' to be executed
__END__
Hope this helps.
--Jeff Pang
-Original Message-
From: [EMAIL PROTECTED]
To: beginners@perl.org
Sent: Sat, 16 Sep 2006 9:33 PM
Subject: Including
Hi: I have a script called main.pl. I want to include
few lines of code from another file called user.rules
if it exists. I have tried using the require statement
to do that as shown below within the main.pl.
if (-e "/opt/user.rules")
{
require "/opt/user.rules";
}
I get the following error
/