in reply to Re: How to use a .pm file in a .pl file in another directory.
in thread How to use a .pm file in a .pl file in another directory.

use lib "path/to/Chess path/to/Chess/Piece";

In this case, when you try to use Chess::Piece, Perl would look for "path/to/Chess path/to/Chess/Piece/Chess/Piece.pm" — so that likely won't work.

Perl essentially does the following to create the full path:

use lib "searchpath"; use Chess::Piece; / / .pm => "searchpath/Chess/Piece.pm"