in reply to Re^9: warning: use of uninitialized value
in thread warning: use of uninitialized value
hello robby_dobby... thanks for the help..i am at the initial level so your suggestion are helping a lot
i have tried your suggestion and changed the code like this
my $cChipId; my $cSubVersId; my %data_ids; my $readline; if(open (my $CFILE,"config.txt" ) || die "couldnt open file:", $! ) { while ($readline = <$CFILE>) { chomp $readline; my ($key , $value) = (split /::/, $readline); $data_ids($key) = $value; $readline = <$CFILE>; } foreach my $key (keys %data_ids) { $cChipid = $data_ids('chipid'); $cSubVersId = $data_ids('subversid'); } } close($CFILE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: warning: use of uninitialized value
by robby_dobby (Hermit) on Jun 26, 2015 at 09:11 UTC | |
by mrityunjaynath (Acolyte) on Jun 26, 2015 at 10:17 UTC | |
by robby_dobby (Hermit) on Jun 26, 2015 at 10:31 UTC |