Narcissist: Difference between revisions

{{header|Liberty BASIC}}
(Added one for Python (tested in 2.7))
({{header|Liberty BASIC}})
Line 55:
Based upon [[Quine#Using_eval|one of the quines]]. Outputs 'true' if source is equal to inputted line (newline terminated), 'false' otherwise.
<lang javascript>var code='var q=String.fromCharCode(39);print("var code=" + q + code + q + "; eval(code)" == readline())'; eval(code)</lang>
 
=={{header|Liberty BASIC}}==
<lang lb>
s$ = "s$ = Input a$ : Print (a$ = Left$(s$, 5) + chr$(34) + s$ + chr$(34) + Mid$(s$, 14, 3) + Mid$(s$, 6, 100)) + Mid$(s$, 23, 3)" : Input a$ : Print (a$ = Left$(s$, 5) + chr$(34) + s$ + chr$(34) + Mid$(s$, 14, 3) + Mid$(s$, 6, 100))
</lang>
 
=={{header|Perl}}==
Anonymous user