A perl version of config script