Fetching the results of a SQL query into a hash map in PERL : <p>I am a beginner to perl. So am just trying out some random perl codes.
I have an sql query which gives me a number of rows, with 2 values in each row.
I want to store this result into a hash say</p>

<pre><code>%result_hash
</code></pre>

<p>in such a way that the first value will be the key and second one will be its value.</p>

<p>I tried it with a while-loop which iterates over each row. Its working fine.
I wanted to know if there is any other simpler way of doing this..</p>
