I'm sure I've done something awefull

Awefull, as in "I am full of awe" well yes, because, basically, you can't do that. The environment table is a simple hash of scalars, to put it in terms of Perl. You can't create references to hashes as values of environment variables. If you were brave and insisted on that approach, you could try $ENV{FOO} = "var=$var:foo=$foo:this=$this and then retrieve the information by first splitting on : and then splitting on =. Or regexps, whatever.

But even if that were possible, it still wouldn't help you very much, because setting environment variables in a web process does not mean that you are guaranteed that a given process x that dealt with the initial contact of client y will deal with that same client y in subsequent transactions. This is because of the stateless nature of the HTTP protocol. There is nothing in a client transaction (whether it be a GET, POST or whatever) that ties it to any other transaction either in the past or the future.

To store authentication data, you have to pass an unguessable (read: random) string of bytes back to the client that serves as a unique identifier, so that the next time they return to your site, you know that you have seen them before. The two simplest ways a client has of returning you this unique identifier is either as a cookie, or as a parameter on a POST or GET request.

If that doesn't make much sense, just holler, and I (or someone else) will elaborate (but the fact that you use a hash of hashes indicates that you are not a complete beginner).

btw, it's "environmental"


print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'

In reply to Re: A case for environmental conservation? by grinder
in thread A case for enviromental conservation? by caedes

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.