My first thought was "this sounds like a job for a hash". next if exists( $filesToSkip{$filename} );
The retention between runs requirement just means that you need to save the hash to a file and load it back on startup: Try Storable for that.
Comment on Re: mark unreadable file so a loop does not read the file again