Heres the pseudo-code form of my script .. step 1 : Getting all .pm filenames from a directory that satisfies a particular condition. ( in an array ) step 2 : Traverse through the array of filenames and use the module dynamically