BEGIN {unshift @INC, "C:/"};
use Cards::need;
print "$w";
I have added a folder named Cards in C:\\ directory, inside which there is the module called need.pm. It contains this code:
package Cards::need; our @b; $w = 5; @b = (1,2,3);
However when I run the test.pl file, nothing gets printed until I edit the 3rd line to be a fully qualified name like print $Cards::need::w. So why is the implicit import not working?
This post has been edited by cupidvogel: 06 May 2012 - 08:20 AM

New Topic/Question
Reply



MultiQuote





|