I am writing my first module just to see if I can get it to work. It is extremely simple:
use strict; use warnings; package Example; use Exporter; @EXPORT = "$thing"; our $thing = "thing"; 1;
Then I used the module in a simpler script:
use strict; use warnings; use Mine::Package; print $thing;
I know I got the module name right. My module is located in Perl/site/lib/Mine/Example/ on my computer. So why isn't my program printing "thing"?
Thanks
UPDATE:I changed some package and folder names to make it easier on everyone. I also changed my code to look like my reply to davido. Added strictures.
In reply to Writing Modules by perl.j
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |