Think about Loose Coupling | |
PerlMonks |
Re: Glob error check giving warningby ysth (Canon) |
on Dec 05, 2010 at 08:38 UTC ( [id://875468]=note: print w/replies, xml ) | Need Help?? |
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.
-- A math joke: r = | |csc(θ)|+|sec(θ)|-||csc(θ)|-|sec(θ)|| | Online Fortune Cookie Search Office Space merchandise
In Section
Seekers of Perl Wisdom
|
|