<p>I find myself running scripts and copy-pasting the output of these runs into emails or into some other documents. Is there a way such that I can make the copy-to-clipboard step a part of the script itself? Most of my scripts are either Perl or bat files and I work on Windows. </p>

<p>Thanks.</p>

Not sure about the clipboard but you can pipe the output to a text file but doing something like this:
```
```
somescript.bat > output.txt
```
```