Use grep() instead of looping through the opened .info and .SlackBuild files to get variables from them.