ioctl

ioctlFILEHANDLE,FUNCTION,SCALAR
This function implements the ioctl(2) syscall, which controls I/O. To get the correct function definitions, first you’ll probably have to say:
require "sys/ioctl.ph"; # perhaps /usr/local/lib/perl/sys/ioctl.ph
If sys/ioctl.ph doesn’t exist
or doesn’t have the correct definitions, you’ll have to roll your own
based on your C header files such as sys/ioctl.h. (The Perl distribution includes
a script called h2ph to help you do
this, but running it is nontrivial.) SCALAR
will be read or written (or both) depending on the
FUNCTION—a pointer to the string value of
SCALAR will be passed as the third argument
of the actual ioctl(2) call. If
SCALAR has no string value but does have a
numeric value, that value will be passed directly rather than a pointer
to the string value. The pack and
unpack functions are useful for
manipulating the values of structures used by ioctl. If the ioctl needs to write data into your
SCALAR, it is up to you to ensure that the ...