Hi,

Still I have some problem.

runtest.pl
----------

#!/opt/perl/bin/perl -w
use strict;

require "test_init.pl" or die("Can't require test_init.pl");
require "configure.pl" or die("Can't require configure.pl");
require "common_functions.pl" or die("Can't require common_functions.pl");

Here, common_functions.pl file uses the variables which are in test_init.pl
file.
But common_functions.pl couldn't access the variables which are in
test_init.pl file.

$ perl runtest.pl
Global symbol "$PROD_TESTS" requires explicit package name at
common_functions.pl line 11.
Global symbol "$LOG_DIR" requires explicit package name at
common_functions.pl line 14.
Global symbol "$TOTAL_TEST_LOG" requires explicit package name at
common_functions.pl line 19.
Global symbol "$TOTAL_TEST_LOG" requires explicit package name at
common_functions.pl line 19.
Global symbol "$PROD_TESTS" requires explicit package name at
common_functions.pl line 24.
Compilation failed in require at runtest.pl line 6.
$

----- Original Message ----- 
From: "Charles K. Clarkson" <[EMAIL PROTECTED]>
To: "'Durai'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, April 30, 2004 9:25 AM
Subject: RE: To include another file in perl program


> Durai <[EMAIL PROTECTED]> wrot:
> :
> :            It works fine. Thanks.
> : But I don't know about 1; action?
> :
> : Is it the return value?
>
>    Yes. Read perlfunc 'require':
>
>
>  "The file must return true as the last statement to
>   indicate successful execution of any initialization
>   code, so it's customary to end such a file with 1;
>   unless you're sure it'll return true otherwise. But
>   it's better just to put the 1;, in case you add more
>   statements."
>
>
> HTH,
>
>
> Charles K. Clarkson
> -- 
> Mobile Homes Specialist
> 254 968-8328
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to