in reply to Using File Reference

You can use the following approach
sub setDestFile { my($self, $file) = @_; open(my $fh, ">$file"); $self->{'destfile'} = $fh; }

--perlplexer