in reply to Re^8: magic-diamond <> behavior -- WHAT?! (dock)
in thread magic-diamond <> behavior -- WHAT?!
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: magic-diamond <> behavior -- WHAT?! (dock)
by mr_mischief (Monsignor) on Nov 05, 2008 at 18:55 UTC | |
|