in reply to help with form querying

You could easily do it with grep:
@files = grep(/^$imageNum/, @files);
Another option, would be to use the input to adjust the name passed to File::Find::Rule. (Although you'll want to be sure you verify the data the user submits if you do it that way)