Note that the mode in the second argument must match the mode which $fh was opened with.open(my $fh2, ">&", $fh) or die "Can't dup filehandle: $!";
In reply to Re: dup() in perl
by tilly
in thread dup() in perl
by vinoth.ree
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |