Jump to content

Copy stdin to stdout: Difference between revisions

m
→‎{{header|Raku}}: Fix code: Perl 6 --> Raku
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
m (→‎{{header|Raku}}: Fix code: Perl 6 --> Raku)
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.
 
<lang perl6>perl6raku -pe'.lines'</lang>
 
When invoked from a file: Lines are auto-chomped, so need to re-add newlines (hence .say rather than .print)
2,392

edits

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