Interesting.

In any event apparently defined() on the <DATA> file handle is not needed - or at least not any more.

Update: I haven't been able to reproduce this warning on my current Perl 5.24 version. From what I remember the warning was unusually specific in what it said - this was very specific. To my knowledge, I never did actually try Perl code that would cause the problem that was warned about. This was a warning about something that could potentially happen - not an error. This situation did not occur in my source code. I just took Perl at "its word" and adjusted my source code so that this warning went away.

I think of Perl as a living, breathing, biological organism that evolves over time. It is completely possible that this was an extraneous warning about something that didn't really matter. At this point, I don't know. It could be that this warning was just emitted in one version of Perl and corrected in the next version. I've worked with a lot of versions of Perl. I don't have nor would I have saved the exact text of this warning.


In reply to Re^7: how do I "initialize" $_ by Marshall
in thread how do I "initialize" $_ 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.