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.
In reply to Glob error check giving warning by perl_mystery
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |