IO::String for Perl6
Perl 6
Switch branches/tags
Nothing to show
Latest commit 364df27 Jun 3, 2017 @hoelzro committed on GitHub Merge pull request #11 from zoffixznet/patch-1
Bump version
Failed to load latest commit information.
lib/IO Fix .lines and .get May 26, 2017
.gitignore Implement .say May 5, 2017
.travis.yml Fix travis build May 26, 2017
LICENSE Add license Aug 8, 2014
META6.json Bump version Jun 2, 2017 Add README Aug 8, 2014




        use IO::String;

        my $buffer =;
            my $*OUT = $buffer;
            say "hello";
        say ~$buffer; # hello


Sometimes you want to use code that deals with files (or other file-like objects), but you don't want to mess around with creating temporary files. This includes uses like APIs that for some reason don't accept strings as well as files as targets, mocking I/O, or capturing output written to the terminal. That's why this module exists. Loosely based on Perl 5's IO::String.


  • Input as well as output
  • Handle encodings