|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re^2: Share Variable in Script with a Moduleby DanielSpaniel (Scribe) |
| on Oct 09, 2013 at 16:44 UTC ( [id://1057587]=note: print w/replies, xml ) | Need Help?? |
|
Okay, that does work, but seems to introduce another problem, which I don't quite understand. The test module, and test script, are shown below: The moduleThe script
Previously, before trying to pass the module anything at all, and thus without the import sub, I would be able to read @list, defined in the module, in test.pl. However, now, with the import sub, I'll get an error when running test.pl, "Global symbol "@list" requires explicit package name at test.pl line 8." I don't see why this should be, seeing as it appears to be defined and exported properly in the module; in fact nothing to do with @list has changed. I did also try referencing @list with the package name, but that doesn't work either. Any help/suggestions would be much appreciated. Thanks!
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||