in reply to
dup() in perl
According to the documentation for
open
you should try this:
open(my $fh2, ">&", $fh) or die "Can't dup filehandle: $!";
[download]
Note that the mode in the second argument must match the mode which $fh was opened with.
Comment on
Re: dup() in perl
Download
Code
In Section
Seekers of Perl Wisdom