Flame blinks.
Flame blinks again.
Flame stares at code with open mouth and looks ready to start hitting delete repeatedly.
Flame restrains himself from hitting delete repeatedly.
Flame settles down to explain his foolish mistake.

Ok... I figured out what threw me off. I was using Devel::ptkdb to try to trace down a problem (I'll get to it in a min), when I noticed that the variables being passed were all "\####", when they were suppost to be references (Makes me wonder if you can change the constant of a number... think about it... my $num = \1; $$num = 543;  print 1; Anyway, so that explains the appearance that it wasn't really a reference. As to the actual problem... I was using $$_[0] to try to access the data within the sub, and that doesn't work... need ${$_[0]}.

Anyway, thanks for helping me cut my debug time significantly by convincing me that what I was sure was the problem, wasn't.

Edit:: Added link to Devel::ptkdb reference.


My code doesn't have bugs, it just develops random features.

Flame ~ Lead Programmer: GMS (DOWN) | GMS (DOWN)


In reply to Re: Re: reference to array element? by Flame
in thread reference to array element? by Flame

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.