in reply to Grep fail condition

if the size of the hash is much smaller than the array, by order of magnitude. then it would be more efficient to loop the other way around. that is, loop through the array. it might make also make it more natural/fitting in certain circumstances as well, depending on more program context.
if the array grows to "huge" size. it might make it more efficient or at least easier to manage, to pre-process the array to add hash keys of any .plf or other filenames of interest, at each position in the array. e.g. $files[200]{'filename'}{'something.plf'}=1; OR other some structure to get similar effect.
the hardest line to type correctly is: stty erase ^H