File handles can be opened to "in memory" files held in Perl scalars via: open($fh, `>', \$variable) || ..