Copy stdin to stdout: Difference between revisions

Content added Content deleted
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
m (→‎{{header|Raku}}: Fix code: Perl 6 --> Raku)
Line 256: Line 256:
When invoked at a command line: Slightly less magical than Perl / sed. The p flag means automatically print each line of output to STDOUT. The e flag means execute what follows inside quotes. ".lines" reads lines from the assigned pipe (file handle), STDIN by default.
When invoked at a command line: Slightly less magical than Perl / sed. The p flag means automatically print each line of output to STDOUT. The e flag means execute what follows inside quotes. ".lines" reads lines from the assigned pipe (file handle), STDIN by default.


<lang perl6>perl6 -pe'.lines'</lang>
<lang perl6>raku -pe'.lines'</lang>


When invoked from a file: Lines are auto-chomped, so need to re-add newlines (hence .say rather than .print)
When invoked from a file: Lines are auto-chomped, so need to re-add newlines (hence .say rather than .print)