http://www.perlmonks.org?node_id=1190628


in reply to Re^3: 'do' command is dead? Surely not?
in thread 'do' command is dead? Surely not?

Recent versions of Perl (v5.24.1+) removed '.' from @INC, so this is probably right on the mark. If the OP is using a recent enough Perl version it will not look in the dot path unless something like this happens:

use lib '.';

Though that is subject to the challenges that the dot path has always faced. It would be better to do something like this:

use FindBin; use lib "$FindBin::Bin/../lib"; # Or whatever is accurate for this scr +ipt's needs.

This eliminates sensitivity to where the script was invoked from.

See also: FindBin, lib, and perl5241delta.


Dave