Hello everyone ....i have a written a code where i would take up the value form a config.txt file and use those value further. The code is working fine but every time it runs along with the correct output it is also giving some warning like
use of uninitialized value $key in hash element at newperlfile.pl line 85, <$CFILE> line 3
my config.txt file reads like this
chipid::1925
subversid::0001
the code portion is here with and line 85 being marked *****
please put some light as i am not able to solve thismy $cChipId; my $cSubVersId; my %data_ids; my $readline; open (my $CFILE,"config.txt" ) || die "couldnt open file: $!"; while ($readline = <$CFILE>) { chomp $readline; my ($key , $value) = (split /::/, $readline); $data_ids{$key} = $value; ***** } close($CFILE); for my $key (keys %data_ids) { $cChipId = $data_ids{'chipid'}; $cSubVersId = $data_ids{'subversid'}; }
In reply to use of uninitialized value in hash element problem by mrityunjaynath
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |