hii athanasius i have tried something on the above code . its working but when i have printed $chipID it prints cChipId and $cSubVersId gives 1925 (in last two lines of code ) while the value i have provided through config text ChipId 1925 and SubVersId 0003. so its problemetic output. no warning this time though
thanksmy @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>; chop($readline); } $cChipId = $words[0]; $cSubVersId = $words[1]; print "$cChipId \n"; print "$cSubVersId \n"; }
In reply to Re^4: warning: use of uninitialized value
by mrityunjaynath
in thread warning: use of uninitialized value
by mrityunjaynath
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |