http://www.perlmonks.org?node_id=875468


in reply to Glob error check giving warning

By and large, don't use glob() in scalar context. The next time your program executes that line, it will provide the next *.ntp file from the original directory, even if $dir has changed, and after getting each *.ntp file, it will return undef once before restarting. Try this instead.
if ( ! defined( $file ) ) { $file = ( glob(...) )[0]; if ( ! defined( $file ) ) { die "no NTP file\n"; } }
--
A math joke: r = | |csc(θ)|+|sec(θ)|-||csc(θ)|-|sec(θ)|| |
Online Fortune Cookie Search
Office Space merchandise