in reply to Re: use lib problem.
in thread use lib problem.

This was covered recently. Your solution doesn't work because the assignment is still executed after the use. The use statement finishes compiling before the BEGIN statement, so it's executed first. A fix:

my $mod_path; BEGIN { $mod_path = '/home/tanger/www/mods'; } use lib $mod_path; use Email::Valid;

Follow the above link for alternative solutions.