[Kochi-pm] Access Memory Location using Perl

Shibu P U shibu.pu at gmail.com
Wed Aug 25 01:30:36 PDT 2010


You have written as "I have a hash reference and if we print the reference
variable we will get an address.".
Above, you are printing a variable no?? I meant that variable.

Regards
Shibu P U


On Wed, Aug 25, 2010 at 1:39 PM, Bharathiraja P <pbrthemaster at gmail.com>wrote:

> I have only the address not the reference variable.
>
>
> On Wed, Aug 25, 2010 at 12:50 PM, Shibu P U <shibu.pu at gmail.com> wrote:
>
>> If you have the reference variable, can't you dereference it and use?
>> For example, if $hashref is a hash reference, you can dereference it as my
>> %hash = %$hashref;
>>
>> Regards
>> Shibu P U
>>
>>
>> 2010/8/25 Bharathiraja P <pbrthemaster at gmail.com>
>>
>> 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.
>>>
>>> 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).
>>>
>>> 2010/8/25 Varghese Chacko <vctheguru at gmail.com>
>>>
>>>  How do you get the memory address without any type info like Array/Hash
>>>> or Scalar? Are you trying to access ports?
>>>>
>>>> --VC
>>>>
>>>> Bharathiraja P wrote:
>>>>
>>>> Hi,
>>>>
>>>>           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?
>>>>
>>>> --
>>>> Bharathiraja
>>>>
>>>> ------------------------------
>>>>
>>>> _______________________________________________
>>>> Kochi-pm mailing listKochi-pm at pm.orghttp://mail.pm.org/mailman/listinfo/kochi-pm
>>>>
>>>>
>>>>
>>>> --
>>>> 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.
>>>>
>>>>
>>>> _______________________________________________
>>>> Kochi-pm mailing list
>>>> Kochi-pm at pm.org
>>>> http://mail.pm.org/mailman/listinfo/kochi-pm
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Kochi-pm mailing list
>>> Kochi-pm at pm.org
>>> http://mail.pm.org/mailman/listinfo/kochi-pm
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/kochi-pm/attachments/20100825/d98c3866/attachment-0001.html>


More information about the Kochi-pm mailing list