use strict; use warnings; wibble (); wibble (); sub wibble { my $unicode16Str; open my $UTF, '>:encoding(UTF-16LE)', \$unicode16Str; print $UTF "Wibble"; close $UTF; }