The original 20+-year old code has no "pseudo-" qualifier. Read it again and please point out where it says anything about that being "pseudocode". I don't know how much clearer it could be, but:

THE ONLY REASON THAT SNIPPET IS CALLED PSEUDOCODE IN THE CURRENT DOCUMENTATION IS THAT IT USES THE NAME ARGV FOR A FILEHANDLE AS IF A FILEHANDLE WITH THE NAME ARGV WERE NOT OTHERWISE MAGIC.

IT IS OTHERWISE THE EXACT SAME FRELLING REAL PERL CODE FROM VERSION 1.0'S MANUAL PAGE, AND WERE YOU TO SIMPLY CHANGE THE NAME OF THE SAMPLE FILEHANDLE FROM ARGV TO FRED IT WOULD WORK THE SAME AS <>.

SAYING THAT MAGIC <> WAS MEANT TO BE NOT MAGICAL BECAUSE OF THAT DISTINCTION IS MISSING THE POINT OF THE QUALIFICATION COMPLETELY.

Two-argument open has always been magic for filenames begining or ending in pipes (which are referred to (and have been referred to as such for, again, 20+-years) as just 'filenames' and not 'sooper magical pipey filenames of justice' or what have you; which means any distinction with regards to two-arg open is a misunderstanding as it is two-arg open which imparts special meaning upon filenames of a specific format). <> is magic. <> has always been magic. If you don't want the magic, you don't use the magical form either back 20+-years ago or with the current versions. But to say that it never was intended to be magic is just ahistorical revisionism, and was pointed out as such during the discussion on p5p.

The cake is a lie.
The cake is a lie.
The cake is a lie.


In reply to Re^9: magic-diamond <> behavior -- WHAT?! (dock) by Fletch
in thread magic-diamond <> behavior -- WHAT?! by repellent

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.