use lib to put the current directory at the front of the load list:
use strict; use lib '.'; use test; print $x
But you should just follow the good advice you've received from toolic and change the name of your module to something saner like MyTest.pm.
In reply to Re: Global symbol x requires explicit package name at main.pl
by rowdog
in thread Global symbol x requires explicit package name at main.pl
by beanryu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |