?
Solved

PerlScript with ASP question

Posted on 2004-10-18
6
Medium Priority
?
163 Views
Last Modified: 2010-03-05
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
Comment
Question by:astankovic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 12339827
How are you defining $Session?
0
 
LVL 4

Author Comment

by:astankovic
ID: 12339868
$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
 
LVL 84

Expert Comment

by:ozo
ID: 12340049
$Session->{MyDictionary} = {MyItem => 'something'};
$something = $Session->{MyDictionary}{MyItem};
0
 
LVL 4

Author Comment

by:astankovic
ID: 12342263
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
 

Accepted Solution

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

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question