in reply to Setting environment!!

No one ( accept KM, but I think too much information sucks for newbies, so this node answers the question only )has addressed the fact that you want to set the environment variable... give the man what he wants!
$ENV{PERL5LIB} = '/foo';
Notice that I didn't do this within BEGIN because you may also want to include other things like CGI.pm and that will break if you set the environment BEFORE you include your packages.

i_had_a_little_trouble_so_i_came_up_with_this

Replies are listed 'Best First'.
RE: Re: Setting environment!!
by nardo (Friar) on Jul 03, 2000 at 22:44 UTC
    If you truly wanted to give the man what he wants you would have done it in BEGIN because he currently sets the environment variable before his program runs, so to mimic this behavior, you would want to set it as soon as possible.