opendir and readdir for getting lists of filenames (or glob; alternately you may want File::Find or File::Find::Rule if you need to search a hierarchy but this sounds like a single flat directory)
mkdir to make a directory (or possibly mkpath from File::Path)