I use this simple script to test out emailing a query below and get the error stating that "cannot find MIME/Lite.pm' anywhere.
Now mind you I have MIME/Lite.pm installed in
/home/samcsm/jcorbett/myperl/lib/perl5/site_perl/MIME/Lite.pm
Can you tell me whats wrong?
#!/usr/bin/perl use warnings; use strict; use DBI; use MIME::Lite;
BEGIN{ unshift (@INC, '/home/samcsm/jason/myperl/lib/perl5/site_perl/MIME/Lite.pm');}
As Randy mentioned, you are adding the wrong path to @INC. But I think there is one more thing that is not correct here: Even if you put that statement in a BEGIN block, you must not have "use MIME::Lite;" before the statement. Both "use" statements and statements in BEGIN blocks are executed at compile time, but the order still matters. So either:
BEGIN {unshift @INC, '/home/samcsm/jason/myperl/lib/perl5/site_perl'} use MIME::Lite;
or
use lib '/home/samcsm/jason/myperl/lib/perl5/site_perl'; use MIME::Lite;
-- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>