Narcissist: Difference between revisions

Content added Content deleted
m (→‎{{header|Perl 6}}: Use method form of eval, possible thanks to jnthn's fix in rakudo.)
m (→‎{{header|Perl 6}}: Put eval first and golf a few characters.)
Line 141: Line 141:
Note how the code takes advantage of Perl 6's ability to nest quoting delimiters.
Note how the code takes advantage of Perl 6's ability to nest quoting delimiters.


<lang perl6>(my $self = q{say slurp() eq '(my $self = q{'~$self~'}).eval'~10.chr ?? 'Beautiful!' !! 'Not my type.'}).eval
<lang perl6>eval my $self = q{say slurp() eq 'eval my $self = q{'~$self~'}'~10.chr ?? 'Beautiful!' !! 'Not my type.'}
</lang>
</lang>