Keeping in mind that this golf challenge asks for a program rather than a subroutine... :)
in reply to Perl Golf Proposal
example usage: perl missing.pl bar .jpg 0000 0050
Hurrah for the range operator and magical auto-increment!
As best I can figure it, the only way to accurately accomplish the bonus (checking for a comparison string that's too big) is to check all the files in the directory. Otherwise there could be one file in there with a unique part of the right length.