Thank you for all the replies.
I found poj's response very helpful and yet confusing. His code indeed works, but I don't understand why. I am assigning a string to a hash value through a reference. So, in my mind it shouldn't matter what that string happens to be. Instead, poj's code suggests that the carriage return is what is causing the problem of not being able to assign the string. However, the carriage return is already url-encoded before the assignment takes place. (???) Can someone provide an explanation of what is happening here?
pg's 1st point is well taken. I misused the term parser. It is indeed a handler. On your 2nd point: I understand what you are getting at, but not sure if I can get there. My only formal coding instruction has been Turtle Graphics on a 8088 in the 80's. I'm still trying to fully wrap my head around OO. I get it for the most part. However, right now I can drive the car, but I'm still learning how to build the engine. Mabye this is a good opportunity for me. I will investigate separating the filter from the handler (although I'm not quite sure how it could sit -between- the parser and handler; I would think the handler would call it out during processing events - which I guess is how I have it now...hmm...?)
First, thanks for the XML::SAX module Matts. However, the code you pointed out I don't believe to be the problem since earlier in the code I do:
$pos[$depth] = \$data{$id_attribute};

The correct dereference to get the value of that hash key should be:
print "${$pos[$depth]}\n";

Am I wrong here?

Again, thanks everyone, I'm learning a lot with this one.

Thanks,
Alex

In reply to Re: Setting the value of a complicated hash ref by blahblah
in thread Setting the value of a complicated hash ref by blahblah

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.