in reply to Use of uninitialized value $cui1 in print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Use of uninitialized value $cui1 in print
by AnomalousMonk (Archbishop) on Mar 02, 2017 at 19:58 UTC | |
Error1 is: ... Ok, so what's the code that produces the error? I don't see any eq operator ("string eq") in the OPed code, nor a $concept1 scalar. (Update: A small point: a "warning" (see warnings, which you are wise to use, as you seem to be doing) is not an error, but merits your attention nonetheless.) Update: Rats. Many small changes to added update sentence in preceding paragraph just to get it to make sense! Give a man a fish: <%-{-{-{-< | [reply] [d/l] [select] |
by Raksha Jalan (Initiate) on Mar 03, 2017 at 03:44 UTC | |
this subroutine in code is by default present in umls::similarity package. Where our $t1 is passes as $concept1 and $t2 is passed as $concept 2.So I dont think there is anything wrong in this code.What am I thinking is maybe $t1 is not able to get value as string the way it should be.Well I am beginner so I dont have much knowledge so plz help me | [reply] [d/l] |
by AnomalousMonk (Archbishop) on Mar 03, 2017 at 05:12 UTC | |
I have never used nor even seen the UMLS::Similarity::lch module before and, after a brief perusal, have only the vaguest idea of what it is supposed to do. However, total ignorance should never prevent a righteous monk from offering an opinion! So...
If the value (which should be an array reference) returned to $cu1 by the call to the getConceptList() method in the
Because an undefined $cui1 will become an undefined $concept1 within the call to the getRelatedness() method, you will get a warning like "Use of uninitialized value $concept1 in string eq at UMLS/Similarity/lch.pm ... at the line number associated with the
So your first step is to determine whether $cu1 is undefined or a reference to an empty array. I would do this with a Data::Dumper print debugging statement after the method call: I hope this helps. It seems you've already gone quite a way through the steps I've outlined, but maybe this will help clarify things a bit. Give a man a fish: <%-{-{-{-< | [reply] [d/l] [select] |