> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/perl6-rosettacode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/perl6-rosettacode/programming_tasks/c/copy_stdin_to_stdout.md).

# Copy stdin to stdout

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.

```perl
raku -pe'.lines'
```

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

```perl
.say for lines
```
