Print itself: Difference between revisions

→‎{{header|Raku}}: Add a Raku example
m (Fix internal link)
(→‎{{header|Raku}}: Add a Raku example)
Line 38:
$ go run self_print.go
</pre>
 
=={{header|Raku}}==
{{works with|Rakudo|2020.05}}
Not really sure what the point of this task is.
 
Is is supposed to be a quine?
<lang perl6>my &f = {say $^s, $^s.raku;}; f "my \&f = \{say \$^s, \$^s.raku;}; f "
</lang>
 
Or just a program that when executed echoes its source to STDOUT? (Here's probably the simplest valid program that when executed, echoes its source to STDOUT. It is exceptionally short: zero bytes; and when executed echoes zero bytes to STDOUT.)
 
<lang perl6></lang>
 
Or are we supposed to demonstrate how to locate the currently executing source code file and incidentally, print it.
 
<lang perl6>print $*PROGRAM.slurp</lang>
 
Whatever. Any of these satisfy the rather vague specifications.
 
=={{header|REXX}}==
10,333

edits