in reply to Re^2: Basic - Perl5lib
in thread Basic - Perl5lib

The more common way to add to @INC from within your program is with use lib. The following is equivalent to (more concise than) the code above:
use lib qw( . ~/myperl_modules/ ); use mymodule;
...except that use lib puts the extra dirs at the start of @INC (giving them precedence over system modules, which is normally what you want) while your use of push puts them at the end (giving system modules precedence, which is normally not what you want).