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"; }
In reply to Re^6: warning: use of uninitialized value
by mrityunjaynath
in thread warning: use of uninitialized value
by mrityunjaynath
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |