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


in reply to Re^3: two lib folders
in thread two lib folders

that needs to be
use lib ('/path/to/2/', '/path/to/1/');
To be consistent with the above post of
use lib "/path/to/1/"; use lib "/path/to/2/";
Full demo:
[davidrw@host davidrw]$ perl -le 'use lib qw(/path/to/1/); use lib qw( +/path/to/2/); print join " ", @INC[0..1]' /path/to/2/ /path/to/1/ [davidrw@host davidrw]$ perl -le 'use lib qw(/path/to/1/ /path/to/2/); + print join " ", @INC[0..1]' /path/to/1/ /path/to/2/

Replies are listed 'Best First'.
Re^5: two lib folders
by Belgarion (Chaplain) on Dec 05, 2005 at 22:22 UTC

    Good point! use lib internally reverses the list passed into the import() function. This allows import() to prepend the entire list onto @INC in the same order as shown on the use lib line. Subtle.