I/O on in-core objects like strings and arrays for Perl