You have given us very little to work on. you need to include much more information. Fix the above code to look like this
Then run it and post the output. Then someone may be able to help you.######################################## print 'size new:'.scalar(@new)."\n"; print 'n_size :'.$n_size."\n"; print 'new :'.join('|',@new)."\n"; ######################################## for(my $i=0;$i<$n_size;$i++){ my @w= split(/,/ , $new[$i]); ######################################## print 'i :'.$i."\n"; print 'size w :'.scalar(@w)."\n"; print 'w :'.join('|',@w)."\n"; ######################################## $w[0]=~s/\'//; #pre-process to remove ' from text $w[0]=~s/\'//; as @w='word1' 'word2' $w[1]=~s/\'//; $w[1]=~s/\'//; ######################################## print 'w[0] :'.$w[0]."\n"; print 'w[1] :'.$w[1]."\n"; print 'size w :'.scalar(@w)."\n"; ######################################## my $t1 = "$w[0]"; #$w[0]=word1 without single quotes my $t2 = "$w[1]"; #$w[1]=word2 ######################################## print 't1 :'.$t1."\n"; print 't2 :'.$t2."\n"; ######################################## # print $t1,$t2,"__________"; #working my $cu1 = $umls->getConceptList($t1); #calling function from umls +::similarity #ERRRO 1 as mentioned ######################################## print 'raw cu1:'.$cu1."\n"; print 'size cu1:'.scalar(@{$cu1})."\n"; print 'cu1 :'.join('|',@{$cu1})."\n"; ######################################## my $cui1 =pop @{$cu1}; ######################################## print 'new cu1:'.$cu1."\n"; ######################################## my $cu2 = $umls->getConceptList($t2);***error ######################################## print 'raw cu2:'.$cu2."\n"; print 'size cu2:'.scalar(@{$cu2})."\n"; print 'cu2 :'.join('|',@{$cu2})."\n"; ######################################## my $cui2 = pop @{$cu2}; ######################################## print 'new cu2:'.$cu2."\n"; ######################################## # print $cui1; # ****ERROR2 unintialized $cui1 my $lvalue = $lch->getRelatedness($cui1, $cui2); my $value = $path->getRelatedness($cui1, $cui2);
In reply to Re: Use of uninitialized value $cui1 in print
by huck
in thread Use of uninitialized value $cui1 in print
by Raksha Jalan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |