in reply to using File::Find to search for a particular file

This is what you need to modify in sub cleanup():
 if (/\.pdf$/)
 if (^abc.*\.pdf$/

First regex requires ".pdf" at the end of the string.
Second regex requires "abc" at the beginning, followed by maybe some chars followed by '.pdf'

A "maximal match" will allow the most characters at the beginning of the pattern to match, while still allowing the last pattern to match.