in reply to Using variables, arrays etc from a perl module in main script.
my $file = "qwerty.txt"; open FILE, "< $file"; our @array = <FILE>;
See perlmod and perlsub for information on how scoping works.
On a side note, there are a few things you are doing (an untested 2-argument open, @EXPORT instead of @EXPORT_OK, a bareword filehandle...) that I would consider poor form. I'll assume that's only because you are trying to make a demo script.
|
|---|