$con = Win32::Console->new(standard_handle);
$con = Win32::Console->new(accessmode, sharemode);
The first form creates a handle to a standard channel.
standard_handle can be one of
STD_OUTPUT_HANDLE,
STD_ERROR_HANDLE, or
STD_INPUT_HANDLE.
The second form creates a console screen buffer in memory, which you
can access for reading and writing as a normal console, and then
redirect on the standard output (the screen) with
Display. In this case, you can specify
accessmode to be
GENERIC_READ, GENERIC_WRITE, or
both, determining the permissions you will have on the created
buffer.
sharemode affects how the console can be
shared. It can be specified as either
FILE_SHARE_READ,
FILE_SHARE_WRITE, or both. If you
don't specify any of those parameters, all four
flags will be used.
The following methods are supported by the Win32::Console module.