sub my_print($) { my $string_ref = shift; my $string = $$string_ref; utf8::encode( $string ); print $string; } my_print( \$string );