Why isn't the reference getting passed through as a reference?

A reference refers to a data structure in memory. Here's a reference from a program I just ran: SCALAR(0x1013751c). Since you're on a different machine, there's not much you can do with it.

Now you may not run your program on a whole series of servers, which is fine, and may wonder why it doesn't make sense even in the same program. In my case, knowing the reference does me no good because the program has exited. If you're using the CGI model, where the web server launches a separate process to run the program, this is what's happening.

You may be running mod_perl or another persistent environment, where the program stays running. That's fine, but remember that you're sending this data to a client. Not only may it have absolutely no idea what Perl is or what type of a reference you've passed, imagine what could happen if you did allow the client to tell you what's in your computer's memory!

You need to pass some other sort of data to identify the rows to delete -- the primary key of the appropriate row often works well. Fortunately, that's usually plain scalar data.


In reply to Re: Passing a reference as the value of a hidden html field by chromatic
in thread Passing a reference as the value of a hidden html field by LassiLantar

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.