<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Raja,<br>
<br>
Its similar to 'C' memory allocation. ie, the address of the pointer is
valid ONLY when the variable is in the system memory. I dont think you
can get same data by storing an address in the db and then retrieving
the address, unless you are trying to access some standard ports which
always exists and accessible. So its NOT advisable to store hash
reference in the database and cant guarentee to return the expected
data every time you read that memory. You can always assign
$my_new_hash_ref = 'HASH(0x91498b8)' and de-refer&nbsp; it as my
$my_new_hash = %$my_new_hash_ref;. But it may NOT return any value or
may return undef or may return some garbage or random value or a
de-reference error.<br>
<br>
Give a try and let us know. You may paste your code-snippet so that we
will get a better view of what you are trying to do and we may be able
to suggest something.<br>
<br>
<br>
regards<br>
VC<br>
<br>
<br>
<br>
Bharathiraja P wrote:
<blockquote
 cite="mid:AANLkTiku0h9-3A=pGjkiNeK3viM-Qre83sNK5oujJQwb@mail.gmail.com"
 type="cite">I'm not actually printing. I'm just storing that address
in db and I want to access the hash using the address<br>
  <br>
  <div class="gmail_quote">On Wed, Aug 25, 2010 at 2:00 PM, Shibu P U <span
 dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:shibu.pu@gmail.com">shibu.pu@gmail.com</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">You
have written as "I have a hash reference and if we print the reference
variable we will get an address.".<br clear="all">
Above, you are printing a variable no?? I meant that variable.<br
 clear="all">
    <br>
Regards<br>
    <font color="#888888">Shibu P U</font>
    <div>
    <div class="h5"><br>
    <br>
    <br>
    <div class="gmail_quote">On Wed, Aug 25, 2010 at 1:39 PM,
Bharathiraja P <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:pbrthemaster@gmail.com" target="_blank">pbrthemaster@gmail.com</a>&gt;</span>
wrote:<br>
    <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I
have only the address not the reference variable.
      <div>
      <div><br>
      <br>
      <div class="gmail_quote">On Wed, Aug 25, 2010 at 12:50 PM, Shibu
P U <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:shibu.pu@gmail.com" target="_blank">shibu.pu@gmail.com</a>&gt;</span>
wrote:<br>
      <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">If
you have the reference variable, can't you dereference it and use?<br>
For example, if $hashref is a hash reference, you can dereference it as
my %hash = %$hashref;<br clear="all">
        <br>
Regards<br>
Shibu P U<br>
        <br>
        <br>
        <div class="gmail_quote">2010/8/25 Bharathiraja P <span
 dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:pbrthemaster@gmail.com" target="_blank">pbrthemaster@gmail.com</a>&gt;</span>
        <div>
        <div><br>
        <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I
have a hash reference and if we print the reference variable we will
get an address. I want to access the hash using that address.<br>
          <br>
For ex. if $hash is a hash reference. If we print $hash we will get
something like HASH(0x91498b8). I want to access the hash using the
address HASH(0x91498b8).<br>
          <br>
          <div class="gmail_quote">2010/8/25 Varghese Chacko <span
 dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:vctheguru@gmail.com" target="_blank">vctheguru@gmail.com</a>&gt;</span>
          <div>
          <div><br>
          <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
            <div bgcolor="#ffffff" text="#000000">How do you get the
memory address without any type info like Array/Hash
or Scalar? Are you trying to access ports? <br>
            <br>
--VC<br>
            <br>
Bharathiraja P wrote:
            <blockquote type="cite">
              <div>
              <div>Hi,<br>
              <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Can you tell how can I map memory location to a variable. For
ex. I have a memory address for a hash reference say 0x23413. Is it
possible to access the hash using the memory address?<br>
              <br>
--<br>
Bharathiraja<br>
              </div>
              </div>
              <pre><hr size="4" width="90%">
_______________________________________________
Kochi-pm mailing list
<a moz-do-not-send="true" href="mailto:Kochi-pm@pm.org" target="_blank">Kochi-pm@pm.org</a>
<a moz-do-not-send="true"
 href="http://mail.pm.org/mailman/listinfo/kochi-pm" target="_blank">http://mail.pm.org/mailman/listinfo/kochi-pm</a>
  </pre>
            </blockquote>
            <br>
            <br>
            <pre cols="72">-- 
Regards
Varghese Chacko


=========================================================
Unless you can create the WHOLE universe in 5 days, then
perhaps giving "advice" to God, isn't such a good idea.
            </pre>
            </div>
            <br>
_______________________________________________<br>
Kochi-pm mailing list<br>
            <a moz-do-not-send="true" href="mailto:Kochi-pm@pm.org"
 target="_blank">Kochi-pm@pm.org</a><br>
            <a moz-do-not-send="true"
 href="http://mail.pm.org/mailman/listinfo/kochi-pm" target="_blank">http://mail.pm.org/mailman/listinfo/kochi-pm</a><br>
            <br>
          </blockquote>
          </div>
          </div>
          </div>
          <br>
          <br>
_______________________________________________<br>
Kochi-pm mailing list<br>
          <a moz-do-not-send="true" href="mailto:Kochi-pm@pm.org"
 target="_blank">Kochi-pm@pm.org</a><br>
          <a moz-do-not-send="true"
 href="http://mail.pm.org/mailman/listinfo/kochi-pm" target="_blank">http://mail.pm.org/mailman/listinfo/kochi-pm</a><br>
          <br>
        </blockquote>
        </div>
        </div>
        </div>
        <br>
      </blockquote>
      </div>
      <br>
      </div>
      </div>
    </blockquote>
    </div>
    <br>
    </div>
    </div>
  </blockquote>
  </div>
  <br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Regards
Varghese Chacko


=========================================================
Unless you can create the WHOLE universe in 5 days, then
perhaps giving "advice" to God, isn't such a good idea.
</pre>
</body>
</html>