in reply to Re^3: reading the hash information from a file in thread reading the hash information from a file
Of course, if you're going to go that route, you could leave off the first and last lines (i.e., don't bother making it a package) and require the file. The required file does still have to be valid perl (such as an assignment statement) and I find it preferable to declare the variables which it sets in the main program rather than in the required file, but this basic technique generally works pretty well for reading in configuration data and the like, provided you can trust the file you're reading in.
|