TStanley has asked for the wisdom of the Perl Monks concerning the following question:
The problem is when I actually add a new UserId and password to the .ini file, I receive the following warning several times:#!C:\Perl\bin\perl -w use strict; use Digest::MD5 qw(md5_hex); use IniFile; use Term::ReadKey; my $login=""; my $password=""; my $encryption = Digest::MD5->new; my $ini = new IniFile('C:\Downloads\Perl\test.ini'); print"\n"; print"Login: "; $login=<STDIN>; chomp($login); print"\n"; print"Password: "; ReadMode 2; $password = <STDIN>; chomp($password); ReadMode 0; print"\n"; $encryption->add($password); $password = $encryption->hexdigest; my $logincheck = $ini->exists(['User','UserId',$login]); my $passcheck = $ini->exists(['User','Password',$password]); if($logincheck&$passcheck){ print"UserId/Password Entered\n"; } else{ $ini->put(['User','UserId',$login,-add]); $ini->put(['User','Password',$password,-add]); $ini->save(); }
Any suggestions would be appreciated.Use of unitialized value in concatenation (.) at C:/Perl/site/lib/IniF +ile.pm line 280, <STDIN> line 2.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with IniFile module
by Corion (Patriarch) on Jan 31, 2001 at 12:22 UTC | |
by stefan k (Curate) on Jan 31, 2001 at 15:09 UTC |