perl library for string-to-foldertype inference