Skip to Content
Programming Perl, 3rd Edition
book

Programming Perl, 3rd Edition

by Larry Wall, Tom Christiansen, Jon Orwant
July 2000
Intermediate to advanced
1104 pages
35h 1m
English
O'Reilly Media, Inc.
Content preview from Programming Perl, 3rd Edition

Fcntl

use Fcntl;              # Import standard fcntl.h constants.
use Fcntl ":flock";     # Import LOCK_* constants.
use Fcntl ":seek";      # Import SEEK_CUR, SEEK_SET, SEEK_END.
use Fcntl ":mode";      # Import S_* stat checking constants.
use Fcntl ":Fcompat";   # Import F* constants.

The Fcntl module provides constants for use with various Perl built-in functions. The default set of imports includes constants like F_GETFL and F_SETFL for fcntl, SEEK_SET and SEEK_END for seek and sysseek, and O_CREAT and O_EXCL for sysopen. Supported import tags include ":flock" to access the LOCK_EX, LOCK_NB, LOCK_SH, and LOCK_UN constants for flock; ":mode" to get at constants from sys/stat.h like S_IRUSR and S_ISFIFO; ":seek" to get at the three arguments for seek and sysseek; and ":Fcompat" to get the old-style symbols with a leading "F" but not "F_", like FAPPEND, FASYNC, and FNONBLOCK. See the online documentation for the Fcntl module and your operating system's documentation on the relevant syscalls, like fcntl (2), lseek (2), open (2), and stat (2).

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Perl, 4th Edition

Programming Perl, 4th Edition

Tom Christiansen, brian d foy, Larry Wall, Jon Orwant
Learning Perl, 7th Edition

Learning Perl, 7th Edition

Randal L. Schwartz, brian d foy, Tom Phoenix
Programming the Perl DBI

Programming the Perl DBI

Tim Bunce, Alligator Descartes

Publisher Resources

ISBN: 0596000278Supplemental ContentErrata