in reply to Re: Re: Running external program until N files created
in thread Running external program until N files created

Hmm, good point. Oh, but your second snippet is broken (since Perl doesn't allow multiple post-expression control modifiers).
++$files >= $N and last while defined readdir(DIR);
And keep that defined in there. The files "0" and "" are valid, you know.

japhy -- Perl and Regex Hacker