Welcome
Your understanding of the statement is correct. The <> operator returns files that match the specified pattern, in this case one at a time. Eventually, there will be no files left, in which case the <> operator returns undef (undefined). The function defined returns true as long as you pass it a value other than undef. So, in this case, the defined function returns false when there are no more files, effectivly ending the loop.
Ted Young
($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)In reply to Re: When is defined true?
by TedYoung
in thread When is defined true?
by LazrD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |