in reply to FileHandle in a Hashref
Note that if you're storing FILEHANDLEs in an array, or if you're using any other expression more complex than a scalar variable to retrieve it, you will have to use a block returning the filehandle value instead:
use warnings; use strict; use FileHandle; my $hashref; $hashref->{"fh"} = FileHandle->new(">./test"); print { $hashref->{"fh"} } "Hello\n";
|
|---|