[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

PerlScript with ASP question

Hi,

I have an ASP page that uses PerlScript. I also have a Dictionary object stored in a Session variable.
Now my questions is how can I set an item in the Dictionary object that is in a Session variable.

In VBScript that would be:
Session.Contents.Item("MyDictionary").Item("MyItem") = "something"

I tried:
$Session->Contents->Item('MyDictionary')->Item('MyItem') = 'something';
and
$Session->Contents->Item('MyDictionary')->SetProperty('Item', 'MyItem', 'something');

And it fails.

Thanks,
Alex
0
astankovic
Asked:
astankovic
  • 2
  • 2
1 Solution
 
ozoCommented:
How are you defining $Session?
0
 
astankovicAuthor Commented:
$Session is a "build in" object that is available to all ASP pages.

Remember, this is in a ASP page:

<%@ LANGUAGE = "PerlScript" %>
<%
 #PerlScript code here
%>

Alex
0
 
ozoCommented:
$Session->{MyDictionary} = {MyItem => 'something'};
$something = $Session->{MyDictionary}{MyItem};
0
 
astankovicAuthor Commented:
Tried it and it doesn't seem to work.

However, this:

$my_dict = $Session->Contents('MyDictionary');
$my_dict->SetProperty('Item', 'MyItem', 'something');

seems to do the job.

0
 
ee_ai_constructCommented:
Question answered by asker or dialog valuable.
Closed, 500 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now