Hello everyone, I will clearly tell you the problem.

In my program what i will do is, i will take google's top 10 results for a query and i will take the snippet's or title's from each result and compute the similarity between this returned snippet and the original query..

The computed similarity value is what i stored in the hash as key and the url's will be straightaway stored as hash value..

for e.g $url={will contain the 10 url's grepped from xml result file} $value=sim();#will contain the similarity computed for all the ten res +ults; %hash; sim{ #here i compute similarity between query title and resulted snippet.. return $val;#i will return similarity value for each result } $hash{$value}=$url;#storing key & value in hash #i will sort the keys in hash in descending order to get the highest v +alue in top and print the url associated with that as a ouput..
Now i want to filter it by some threshold like keys higher then 0.4 or something..

In reply to Re^2: Hash table manipulation by sarvan
in thread Hash table manipulation by sarvan

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.