S
surf
In a package I have this, I then use DB_File to tie
%data to a file:
package persist;
%data;
....
<various code>
....
---------------------------------
In another file I have the following code section.
I get a reference to the hash in the persist
package, put a hash reference into it
but when I take it back out it's no longer
a reference. What could I have done wrong ?
$typ = ref($r_session);
print("T:$typ <BR>\n");
$rf = \%persist::data;
$rf->{$app_id} = $r_session;
$myref = $rf->{$app_id};
$typ2 = ref($myref);
$typ3 = ref($rf);
print("T2:$typ2 <BR> \n");
print("T3:$typ3 <BR> \n");
this code prints:
T:HASH
T2:
T3:HASH
%data to a file:
package persist;
%data;
....
<various code>
....
---------------------------------
In another file I have the following code section.
I get a reference to the hash in the persist
package, put a hash reference into it
but when I take it back out it's no longer
a reference. What could I have done wrong ?
$typ = ref($r_session);
print("T:$typ <BR>\n");
$rf = \%persist::data;
$rf->{$app_id} = $r_session;
$myref = $rf->{$app_id};
$typ2 = ref($myref);
$typ3 = ref($rf);
print("T2:$typ2 <BR> \n");
print("T3:$typ3 <BR> \n");
this code prints:
T:HASH
T2:
T3:HASH