> Hi,
> I have Perl program in which I have if condition as "if( -e $hostname) { 
> # do something} else { # do something else}"
> I use Sys::Hostname::hostname() to get the host name.
> If my Windows machine is DHCP enabled ,the if condition turns out be 
> false and vice versa for Static IP address.
> 
> Any pointers in this regard will be highly appreciated.
> 

Not sure how that is possible since C<-e> is a file test operator, it
tells us whether a file (the argument) exists or not.  See,

perldoc -f -e

For more.  Is it really getting to the true part?  Or is it passing or
dieing?  Something sounds fishy.

What does C<$hostname> contain in both cases, try printing the variable? 

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to