However, I used the examples given to me and I'm getting the error message I referenced in that first post, to wit: "Modification of a read-only value attempted"

I doubt that anyone here can answer this question (or this part of the earlier post) based on the information you have given in both posts combined.

Error messages like this tell you which line number in your script has caused the error. You have to show us at least that line of code, along with any other lines of code that are relevant -- that is: for whatever variables are present in the line that causes the error, show us at least the lines where those variables are declared and where values are assigned to them prior to the line that causes the error.

Nothing in the examples given to you in the previous thread would generate this error. None of the code you've posted so far would generate this error. (You haven't posted enough code to show whether it would generate this error.) So you need to show more of your code.

If the code is not ridiculously long, post the whole script. (Do it as an update or reply to this thread, please. Two places for discussing the same problem are more than enough.)


In reply to Re: How to fix error: Modification of a read-only value by graff
in thread How to fix error: Modification of a read-only value by Gnat53

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.