You have given us very little to work on. you need to include much more information. Fix the above code to look like this

######################################## 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);
Then run it and post the output. Then someone may be able to help you.


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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.