. I've never really felt comfortable with those globref things,

You're welcome. Now I'm gonna rant, but not at you, so feel free to turn away now :)

This is a trivial example of why I feel so strongly that the vogue for eschewing whole lumps of Perl's capabilities are self defeating.

The laudable stated intent is to simplify the learning process for new Perlers. The problem is that each time you omit some subsection of perl's vocabulary from a Perler's education, you end up forcing them to jump through hoops to solve the very problems that subsection of the vocabulary was added to the language to deal with.

Globrefs: *STDIN, *STDOUT, *STDERR, *DATA, *ARGV, all remain a vital, irreplaceable part of the Perl programmers everyday vocabulary. And sweeping globrefs under the carpet to hide them from newbies does no one any favours. File handles are "global references". The fact that OO-dogma rejects anything "global", and that we can now use lexical aliases to them with some nice to have side effects, doesn't change that.

Trying to code effectively in Perl without mentioning globrefs is like trying to have everyday conversation without all the words that some would censor with victoriana zeal. Possible, but so stilted as to make it less enjoyable and much harder than it need be.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^3: Filehandle dilemma (DATA, STDIN, a file) by BrowserUk
in thread Filehandle dilemma (DATA, STDIN, a file) by roboticus

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.