perl_mystery has asked for the wisdom of the Perl Monks concerning the following question:
I have a the following line in my code,glob to find out .ntp file in a directory and I do an error check if the file is not found ,I keep getting the below warning ,how do I overcome this?
$file = glob(($dir . '\\files\\*.ntp')) or die "no NTP file\n" if( not + defined( $file ));
Warning:- Value of glob construct can be "0"; test with defined() at perl.pl line 65.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Glob error check giving warning
by ysth (Canon) on Dec 05, 2010 at 08:38 UTC | |
|
Re: Glob error check giving warning
by CountZero (Bishop) on Dec 05, 2010 at 08:05 UTC | |
|
Re: Glob error check giving warning
by Anonymous Monk on Dec 05, 2010 at 02:26 UTC |