in reply to importing arrays from other module
You can't export lexical variables to other modules by using Exporter. So make @p a global variable, and change your otherfile.pl into a Perl module by giving it its own package statement, changing the extension to .pm and then loading it via use.
I just now see that also your syntax for using Exporter is wrong. Even if you're in a big hurry because your homework is due any minute now, consider posting some real yet short example that replicates what you have now instead of making up things and leaving out important details.
|
|---|