In my Perl code I have used the following line :
$host=$hostname if ($host eq undef);
In the output I am getting following message :
Use of uninitialized value $host in string eq at cli.pl line 18.
Though I am not using strict. How can I avoid this message to be print on output?
Use the
definedfunction:Or a shorter form:
(And
use strict, really.)