%dup() function

The %dup() function returns a new file descriptor associated to the same file as the one associated with file.descriptor.

Syntax

new.descriptor = %dup(file.descriptor)