On 2001-06-26, 15:57, H.Merijn Brand wrote: HB> On Tue 26 Jun 2001 15:24, Andreas Fehr <[EMAIL PROTECTED]> wrote: HB> > On 2001-06-26, 08:09, Jarkko Hietaniemi wrote: HB> > HB> > JH> > I didn't find any reference in the README, how to configure libnet so it HB> > JH> > doesn't complain about the configuration: HB> > JH> > Use of uninitialized value in concatenation (.) or string at ../lib/Net/Config.pm line 44. HB> > JH> > (several times) HB> > JH> HB> > JH> 43 my $home = eval { (getpwuid($>))[7] } || $ENV{HOME}; HB> > JH> 44 $file = $home . "/.libnetrc"; HB> > JH> 45 $ref = eval { do $file } if -f $file; HB> > JH> HB> > JH> Where is your $home? HB> > JH> HB> > HB> > HB> > Under Windows, there is no such thing as a home. If one has a network, HB> > there is something as HOMEDRIVE and HOMEPATH. HB> > HB> > So probably something like: HB> > my $home = eval { (getpwuid($>))[7] } || $ENV{HOME} || $ENV{HOMEDRIVE} . $ENV{HOMEPATH}; HB> HB> Would it be safe to use $ENV{HOMEPATH} if $ENV{HOMEDRIVE} isn't defined? or reverse? HB> HB> my $home = eval { (getpwuid($>))[7] } || $ENV{HOME} || ($ENV{HOMEDRIVE}||"").($ENV{HOMEPATH}||""); HB> Fair comment, but as both env-variables come from Windows (not user defined), they should be pretty save. Should. Better to be sure, I guess. HB> > ...as there might be some users who have a $home in Windows. HB> HB> Both MKS-toolkit, nor djgpp utils support the $ENV{HOME}, and acts accordingly, HB> so - if possible - please *do* define the HOME environmental. OTOH, perl HB> configuration should be considerate and accept empty home, or maybe HB> It's OK for me to set $home, but what about all the other users? Isn't there a module for all these standard variables? I often see these getpwuid...[7] and always have to change the according code. So if there is a module, we have to use this (or create one). -- Andreas Fehr [EMAIL PROTECTED]