in reply to Re^5: warning: use of uninitialized value
in thread warning: use of uninitialized value
actually the config file read like this ChipId 1925 SubVersid 0001 thats the reason i have read second line... what i want is to take only numeric value but its not happening the code being the same that i have posted you
when i am reading $words[0] and $words1 its giving chipid and 1925...ok .....but when i am reading $words1 and $ words3 it takes nothing for $words3 and shows warning line uninitialized value for $cSubVersId....please helpmy @words; my $readline; my $cChipId; my $cSubVersId; if(open (my $CFILE,"config.txt" ) || die "couldnt open file:", $! ) { $readline = <$CFILE>; chop($readline); if (defined $readline ) { @words = split(/::/,$readline); $readline = <$CFILE>; } $cChipId = $words[0]; $cSubVersId = $words[1]; print "$cChipId \n"; print "$cSubVersId \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: warning: use of uninitialized value
by robby_dobby (Hermit) on Jun 26, 2015 at 05:05 UTC | |
by mrityunjaynath (Acolyte) on Jun 26, 2015 at 05:26 UTC | |
by robby_dobby (Hermit) on Jun 26, 2015 at 05:47 UTC | |
by mrityunjaynath (Acolyte) on Jun 26, 2015 at 08:55 UTC | |
by robby_dobby (Hermit) on Jun 26, 2015 at 09:11 UTC | |
|