I am getting an error like : "Can't use string (" SOMETHING ") as an array ref while " strict refs" in use" ...

I am still getting stranger errors...

Strange as it may seem, it actually takes less effort to copy/paste the actual error message (including line number) into your post, rather than paraphrasing or summarizing it.

Also, once you've provided the full and exact error message, it's not so very hard to paste in the snippet of code that contains the line number mentioned in the error message (and enough context to indicate how variables in that line have been assigned values). Of course, it also helps to add a comment, pinpointing the line that caused the error.

Try those two things -- show the exact error message, and show the corresponding line of code with background code that shows how variables in that line were set -- and we'll probably be able to give better advice.


In reply to Re: Can't Use String as an Array Ref Help! by graff
in thread Can't Use String as an Array Ref Help! by Anonymous Monk

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.