T
Tomek
Hello!
I am using Perl 5.8.8 on FreeBSD. I have to admit that I already lost 2
hours on something what should be obvious, but for me it isn't
I have 2 files, 1st is a parenting script, and 2nd is an included module.
I want to read from 2nd module a variable set in parenting script.
I have tried:
File 'a':
#!/usr/local/bin/perl
use b;
our $a='a';
$b::a=$a;
File 'b.pm':
package b;
print $a;
Executing 'a' prints just nothing
-----------------------------------------------
I also tried the second variant:
File 'a':
#!/usr/local/bin/perl
use b;
our $a='a';
File 'b.pm':
package b;
use base 'Exporter';
@EXPORT=qw{$a};
our $a;
print $a;
Effect is the same
No data printed
I am now clueless, what am I
doing wrong ?
Regards, Tomasz Kraus
I am using Perl 5.8.8 on FreeBSD. I have to admit that I already lost 2
hours on something what should be obvious, but for me it isn't
I have 2 files, 1st is a parenting script, and 2nd is an included module.
I want to read from 2nd module a variable set in parenting script.
I have tried:
File 'a':
#!/usr/local/bin/perl
use b;
our $a='a';
$b::a=$a;
File 'b.pm':
package b;
print $a;
Executing 'a' prints just nothing
-----------------------------------------------
I also tried the second variant:
File 'a':
#!/usr/local/bin/perl
use b;
our $a='a';
File 'b.pm':
package b;
use base 'Exporter';
@EXPORT=qw{$a};
our $a;
print $a;
Effect is the same
doing wrong ?
Regards, Tomasz Kraus