/home/alex>cd /tmp/ /tmp>echo 'package Foo;1;' > ~/Foo.pm /tmp>perl -E 'use Foo; say "ok"' Can't locate Foo.pm in @INC (you may need to install the Foo module) (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at -e line 1. BEGIN failed--compilation aborted at -e line 1. /tmp>perl -E 'use lib "~"; use Foo; say "ok"' Can't locate Foo.pm in @INC (you may need to install the Foo module) (@INC contains: ~ /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at -e line 1. BEGIN failed--compilation aborted at -e line 1. /tmp>perl -E 'use lib "~/."; use Foo; say "ok"' Can't locate Foo.pm in @INC (you may need to install the Foo module) (@INC contains: ~/. /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at -e line 1. BEGIN failed--compilation aborted at -e line 1. /tmp>perl -E 'use lib $ENV{"HOME"}; use Foo; say "ok"' ok /tmp>perl -v This is perl 5, version 22, subversion 2 (v5.22.2) built for x86_64-linux-thread-multi Copyright 1987-2015, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. /tmp>