<?xml version="1.0" encoding="windows-1252"?>
<node id="152776" title="Re: searching a file" created="2002-03-19 12:04:39" updated="2005-07-21 01:31:06">
<type id="11">
note</type>
<author id="5842">
PrakashK</author>
<data>
<field name="doctext">
I am assuming that you want to search using a &lt;strong&gt;str&lt;/strong&gt;&lt;em&gt;n&lt;/em&gt; to get the corresponding &lt;strong&gt;value&lt;/strong&gt;&lt;em&gt;n&lt;/em&gt;.
&lt;p/&gt;
In that case, a hash is an ideal solution (assuming your file is not too big as to cause memory problems for you). once you have the hash populated, getting a value is as easy as:
&lt;code&gt;
  my $value_n = $hash{$str_n};
&lt;/code&gt;
&lt;p/&gt;
/prakash</field>
<field name="root_node">
152771</field>
<field name="parent_node">
152771</field>
</data>
</node>
