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

[EMAIL PROTECTED] 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




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


Reply via email to