in reply to Re: Re: a simple include....
in thread a simple include....

If you declare $SousMaintenance within prov.pl, like so:

#!/usr/bin/perl # prov.pl use strict; use warnings; use vars qw( $SousMaintenance ); require './inc.pl'; print $SousMaintenance,"\n";

with an inc.pl like:

$SousMaintenance = 'value one'; 1;

the problem goes away. Another idea for you is to include a package declaration within inc.pl so that you create a namespace (seperate from main::) like so:

# inc.pl package myInc; $SousMaintenance = 'value one';

Then call it like this within prov.pl:

print $myInc::SousMaintenance,"\n";

cp
----
"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."