/usr/src/perl/pod/perlfaq5/How_can_I_use_write_into_a_str.pod

How can I use write() into a string?

See the perlform manpage for an swrite function.