HenryTanaka has asked for the wisdom of the Perl Monks concerning the following question:

I can't find PERL5LIB by echo $PERL5LIB in our environment, looks like it is not set. I also can find server perl in our Solaris Unix box. also /usr/local/bin/gcc LIB=/tmp/perlmodules PREFIX=/tmp/perlmodules gcc: LIB=/tmp/perlmodules: No such file or directory gcc: PREFIX=/tmp/perlmodules: No such file or directory gcc: no input files But I create this dir /tmp/perlmodules in this Solaris Box. so some things wrong ?

Replies are listed 'Best First'.
Re: can't find PERL5LIB
by moritz (Cardinal) on Jan 10, 2011 at 13:28 UTC

    Step back. What are you trying to do? Do you want to install a module? or compile Perl? Or what is it that you want to do?

    What steps have you taken, which commands have you executed in which directory?

Re: can't find PERL5LIB
by afoken (Chancellor) on Jan 10, 2011 at 15:01 UTC

    PERL5LIB is optional and often not set. Perl runs fine without it, unless someone has terribly messed up the perl installation.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re: can't find PERL5LIB
by JavaFan (Canon) on Jan 10, 2011 at 15:28 UTC
    usr/local/bin/gcc LIB=/tmp/perlmodules PREFIX=/tmp/perlmodules gcc: LIB=/tmp/perlmodules: No such file or directory gcc: PREFIX=/tmp/perlmodules: No such file or directory gcc: no input files. But I create this dir /tmp/perlmodules in this Solaris Box. so some things wrong ?
    Really? Did you create directories LIB=/tmp/perlmodules and PREFIX=/tmp/perlmodules? That is, in the directory you run gcc from, you have subdirectories LIB= and PREFIX=, each with a subdirectory tmp, who in turn have a subdirectory perlmodules?

    My guess is that you have your shell foo wrong. If you want to set environment variables specifically for the duration of one command, the setting goes in front of the command and its arguments.

    But that's not a Perl problem. Read your shells manual page. (And if you indeed have created those oddly named directories, you have a gcc problem - which isn't Perl either).