Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hi there!

OK, of course, what you are asking for is:

# a hash (most important data type!) # ASP code # if session(strname)="" then # session(strname) = 0 # end if my %session = give_me_my_session( $this_is_who_i_am ); if ( not exists $session{$strname} or $session{$strname} eq '' ) { $sesssion{$strname} = 0; }

Of course, the trick is those give_me_...() and $this_is_... A nice trick if you are using Apache with mod_perl is using Apache::ASP. It gives you a complete ASP environment to program in Perl. It's almost a one-by-one map of ASP objects, thus translating an ASP to a Perl script could almost be done automatically (add sigils where they correspond, change . for -> in ASP objects method calls, and the VB or JS constructs to Perl ones.

By the way, if you can start from scratch, your script will be much cleaner and idiomatic (if you're good at Perl), and you can actually leave the whole ASP mess out and use CGI::Session as suggested by another monk.

If you rather not start all over, Apache::ASP can come very handy (get it from CPAN, of course).

Good luck,

--
our $Perl6 is Fantastic;


In reply to Re: session variables in cgi by Excalibor
in thread session variables in cgi by chuleto1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-18 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found