in reply to Waiting For File Extension Changes

I would prefer:
sub wait_for_files { my $files = shift; my @not_changed_yet = keys %$files; while (@not_changed_yet) { @not_changed_yet = grep { ! -e } @not_changed_yet; sleep(1) if @not_changed_yet; } }
You should at least sleep(1) and maybe longer.

Also, I am testing only the files that are still left.

Replies are listed 'Best First'.
Re: Re: Waiting For File Extension Changes
by Murpher (Initiate) on May 21, 2003 at 17:44 UTC
    Hmm, this looks interesting. It would appear (on first glance) that this would be more efficient than my original idea.