Solved

PerlScript with ASP question

Posted on 2004-10-18
6
160 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
work on ods spreadsheet with perl in ubuntu 4 81
instmodsh - listing perl modules 2 91
Using Perl to parse rows 7 101
Insert Text into odbc.ini file 15 71
On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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…

749 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