I think print<DATA> is not cheating as you're only reading the part of the file that's not interpreted as a program, so it's not much different from printing a here document. On the other hand, if you seek DATA,0,0, that's cheating just like open 0 is, because you're reading what was already interpretted as a program. At least that is my opinion.
| [reply] [d/l] [select] |
That's my first impression of it, too, but I didn't know exactly where others would draw the line. I think the line is at any form of accessing the program text or a parsed representation of it directly. Reading the DATA section clearly doesn't do that.
Part of the challenge of producing a quine in many languages is the careful formatting and escaping required. Reading a special section of data that can look like code without consequence makes that much easier. Perl's always been good at making things easier though (or rather, to give proper credit, Larry and the Porters have been good at it). That your language makes something easier (without going to the point of having a built-in quine() subroutine, anyway) probably shouldn't be considered cheating.
| [reply] |