Re: export variables
- From: patmarbidon@xxxxxxx (Patmarbidon)
- Date: Sun, 30 Dec 2007 07:45:20 +0100
Hello if you want to share variables content you might to use 'our' instead of 'my'.
But I don't understand your example with 'use "file1.pl"'.
I always use 'use module_name' and never 'use program_name'
Can you tell us more
jwaixs@xxxxxxxxx a écrit :
Hello,
Could someone tell me if this is possible and if it is how I do it. I
have the following two file;
file1.pl
---
print "$testvar\n";
---
file2.pl
---
my $testvar = 37;
use "file1.pl";
---
If I run file2.pl (perl file2.pl) I will of course only see a newline.
But is it possible to export the testvar to file1.pl?
Thank you,
Noud
.
- Follow-Ups:
- Re: export variables
- From: Jwaixs
- Re: export variables
- References:
- export variables
- From: jwaixs
- export variables
- Prev by Date: Re: export variables
- Next by Date: Re: export variables
- Previous by thread: Re: export variables
- Next by thread: Re: export variables
- Index(es):