my %fh; open (my $ref, ">", "somefile.txt"); $fh{'something'} = $ref; print $fh{'something'} "Hello World\n";