Jump to content

Narcissist: Difference between revisions

m
→‎{{header|Perl 6}}: A note about non-cheating.
m (→‎{{header|Perl 6}}: Put eval first and golf a few characters.)
m (→‎{{header|Perl 6}}: A note about non-cheating.)
Line 137:
=={{header|Perl 6}}==
 
For the narcissist to work you must be very careful with whitespace. The presented version works if it is stored as a file of exactly one line terminated by a newline character. (As this is a non-cheating narcissist, you don't <em>have</em> to put it in a file. With enough shell quoting-fu you could even pass it to "perl6 -e".)
 
Note how the code takes advantage of Perl 6's ability to nest quoting delimiters.
57

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.