-my $Version = "0.6";
-
-my $NNTPServer = "localhost";
-my $NNTPUser = "";
-my $NNTPPass = "";
-my $Sender = "";
-my $ConfigFile = "yapfaq.cfg";
-my $UsePGP = 0;
-
-################################## PGP-Config #################################
-
-my $pgp = '/usr/bin/pgp'; # path to pgp
-my $PGPVersion = '2'; # Use 2 for 2.X, 5 for PGP > 2.X and GPG for GPG
-
-my $PGPSigner = ''; # sign as who?
-my $PGPPass = ''; # pgp2 only
-my $PathtoPGPPass = ''; # pgp2, pgp5 and gpg
-
-
-my $pgpbegin ='-----BEGIN PGP SIGNATURE-----';# Begin of PGP-Signature
-my $pgpend ='-----END PGP SIGNATURE-----'; # End of PGP-Signature
-my $pgptmpf ='pgptmp'; # temporary file for PGP.
-my $pgpheader ='X-PGP-Sig';
+my $Version = "0.6.2";
+
+my $RCFile = '.yapfaqrc';
+my @ValidConfVars = ('NNTPServer','NNTPUser','NNTPPass','Sender','ConfigFile',
+ 'UsePGP','pgp','PGPVersion','PGPSigner','PGPPass',
+ 'PathtoPGPPass','pgpbegin','pgpend','pgptmpf','pgpheader');
+
+################################### Defaults ##################################
+my %Config = (NNTPServer => "localhost",
+ NNTPUser => "",
+ NNTPPass => "",
+ Sender => "",
+ ConfigFile => "yapfaq.cfg",
+ UsePGP => 0,
+
+ ################################## PGP-Config #################################
+ pgp => '/usr/bin/pgp', # path to pgp
+ PGPVersion => '2', # Use 2 for 2.X, 5 for PGP > 2.X and GPG for GPG
+ PGPSigner => '', # sign as who?
+ PGPPass => '', # pgp2 only
+ PathtoPGPPass => '', # pgp2, pgp5 and gpg
+ pgpbegin => '-----BEGIN PGP SIGNATURE-----', # Begin of PGP-Signature
+ pgpend => '-----END PGP SIGNATURE-----', # End of PGP-Signature
+ pgptmpf => 'pgptmp', # temporary file for PGP.
+ pgpheader => 'X-PGP-Sig');