Actually, that was the problem.
Cheers,
John

> -----Original Message-----
> From: Reinhard Pagitsch [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 22, 2005 4:59 PM
> To: John Serink
> Cc: [email protected]
> Subject: Re: Adding values to hashes
> 
> 
> Hello John,
> Do you have blank lines in the configuration file? This could be the 
> problem.
> 
> 
> John Serink wrote:
> 
> >Hi All:
> >
> >I'm using strict and use warnings in my script and I read in a 
> >configuration file. I think parse it and I want to load some 
> names and 
> >phone numbers into a hash like this: my %ToSend=('party',000);
> >for(my $i=0;$i<scalar(@config);$i++){
> >     if($numberlist == 1){
> >             $config[$i]=~m/=/;
> >             $ToSend{$`}=$';                         # line 35
> >             chomp($ToSend{$`});                     # Line 36
> >     }
> >     if($config[$i]=~m/SERVER=/){
> >             $host=$';
> >             chomp($host);
> >     } elsif ($config[$i]=~m/PASSWORD=/){
> >             $smspassword=$';
> >             chomp($smspassword);
> >     } elsif ($config[$i]=~m/NUMBER LIST/){
> >             $numberlist=1;
> >     }
> >}    
> >my @thekeys = keys(%ToSend);
> >print(@thekeys);
> >print("\n");
> >for(my $i=0;$i<scalar(@thekeys);$i++){
> >     print("$thekeys[$i] with cell number:$ToSend{$thekeys[$i]}\n");
> ># line 52
> >}
> >
> >This all works except I get these warnings:
> >Use of uninitialized value in hash element at smstest_13.pl line 35, 
> ><GEN0> line 7. Use of uninitialized value in hash element at 
> >smstest_13.pl line 36, <GEN0> line 7.
> >Use of uninitialized value in scalar chomp at smstest_13.pl line 36,
> ><GEN0> line 7.
> >LimWan KamelAngparty
> >Use of uninitialized value in concatenation (.) or string at
> >smstest_13.pl line 52, <GEN0>
> > line 7.
> >
> >Anybody know why I'm getting these warnings? The script all 
> works and 
> >does the stuff I want it to but would like to get rid of the 
> warnings.
> >
> >Cheers,
> >John
> >
> >_______________________________________________
> >Perl-Win32-Users mailing list 
> [email protected]
> >To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> >
> >  
> >
> 
> 

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to