Fcntl - load the C Fcntl.h defines
use Fcntl; use Fcntl qw(:DEFAULT :flock);
This module is just a translation of the C fnctl.h file. Unlike the old mechanism of requiring a translated fnctl.ph file, this uses the h2xs program (see the Perl source distribution) and your native C compiler. This means that it has a far more likely chance of getting the numbers right.
By default your system's F_* and O_* constants (eg, F_DUPFD and O_CREAT) and the FD_CLOEXEC constant are exported into your namespace.
You can request that the old constants (FAPPEND, FASYNC, FCREAT,
FDEFER, FEXCL, FNDELAY, FNONBLOCK, FSYNC, FTRUNC) be provided for
compatibility reasons by using the tag
For ease of use also the SEEK_* constants (for
Please refer to your native fcntl(2), open(2), fseek(3),
See the perlopentut manpage to learn about the uses of the O_* constants with sysopen().
See stat in the perlfunc manpage about the S_I* constants.