That was me, however I was not trying to solve the "uninitialized value used in concatenation" problem. I used that as an example of something that was able to tell if it had been set before or not. And indeed, defined did the same thing, I had assumed (incorrectly) that if I had done my $a = undef, it would have thought the value was 'initialized' and not generate that error. I chock this up to the use of uninitialized instead of undefiend in the warning message.

I was trying to create a behavior that depended on if someone had tried to assing a value, even undef, to a variable. So 'my $a' and 'my $a = undef' would result in different behavior.

This is of course not possible, but I did not know that, and I was very confused. Also this was in the IRC channel, and it was very hard to define my question with enough information to prevent people from assuming I was trying to do something that could be solved with the 'defined' check.

How could I have handled this better? Was it just a communication breakdown cause I was trying to do something impossible that closely resembled something that was possible? Or did I just choose a really bad example?


In reply to Re^2: RFC: how to push the boundries without being annoying? by exodist
in thread RFC: how to push the boundries without being annoying? by exodist

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.