- publishing free software manuals
Perl Language Reference Manual
by Larry Wall and others
Paperback (6"x9"), 724 pages
ISBN 9781906966027
RRP £29.95 ($39.95)

Sales of this book support The Perl Foundation! Get a printed copy>>>

28.4.1 Alphabetical Listing of Perl Functions

-w only inspects the read-only file attribute (FILE_ATTRIBUTE_READONLY), which determines whether the directory can be deleted, not whether it can be written to. Directories always have read and write access unless denied by discretionary access control lists (DACLs). (Win32) -r, -w, -x, and -o tell whether the file is accessible, which may not reflect UIC-based file protections. (VMS) -s by name on an open file will return the space reserved on disk, rather than the current extent. -s on an open filehandle returns the current size. (RISC OS) -R, -W, -X, -O are indistinguishable from -r, -w, -x, -o. (Win32, VMS, RISC OS) -g, -k, -l, -u, -A are not particularly meaningful. (Win32, VMS, RISC OS) -p is not particularly meaningful. (VMS, RISC OS) -d is true if passed a device spec without an explicit directory. (VMS) -x (or -X) determine if a file ends in one of the executable suffixes. -S is meaningless. (Win32) -x (or -X) determine if a file has an executable file type. (RISC OS)
Due to issues with various CPUs, math libraries, compilers, and standards, results for atan2() may vary depending on any combination of the above. Perl attempts to conform to the Open Group/IEEE standards for the results returned from atan2(), but cannot force the issue if the system Perl is run on does not allow it. (Tru64, HP-UX 10.20) The current version of the standards for atan2() is available from the Open Group(2).
Meaningless. (RISC OS) Reopens file and restores pointer; if function fails, underlying filehandle may be closed, or pointer may be in a different position. (VMS) The value returned by tell may be affected after the call, and the filehandle may be flushed. (Win32)
Only good for changing "owner" read-write access, "group", and "other" bits are meaningless. (Win32) Only good for changing "owner" and "other" read-write access. (RISC OS) Access permissions are mapped onto VOS access-control list changes. (VOS) The actual permissions set depend on the value of the CYGWIN in the SYSTEM environment settings. (Cygwin)
Not implemented. (Win32, Plan 9, RISC OS) Does nothing, but won't fail. (Win32) A little funky, because VOS's notion of ownership is a little funky (VOS).
Not implemented. (Win32, VMS, Plan 9, RISC OS, VOS, VM/ESA)
May not be available if library or source was not provided when building perl. (Win32)
Not implemented. (VMS, Plan 9, VOS)
Not implemented. (VMS, Plan 9, VOS)
Not useful. (RISC OS) Not supported. (Cygwin, Win32) Invokes VMS debugger. (VMS)
Implemented via Spawn. (VM/ESA) Does not automatically flush output handles on some platforms. (SunOS, Solaris, HP-UX)
Emulates Unix exit() (which considers exit 1 to indicate an error) by mapping the 1 to SS$_ABORT (44). This behavior may be overridden with the pragma use vmsish 'exit'. As with the CRTL's exit() function, exit 0 is also mapped to an exit status of SS$_NORMAL (1); this mapping cannot be overridden. Any other argument to exit() is used directly as Perl's exit status. On VMS, unless the future POSIX_EXIT mode is enabled, the exit code should always be a valid VMS exit code and not a generic number. When the POSIX_EXIT mode is enabled, a generic number will be encoded in a method compatible with the C library _POSIX_EXIT macro so that it can be decoded by other programs, particularly ones written in C, like the GNV package. (VMS)
Not implemented. (Win32) Some functions available based on the version of VMS. (VMS)
Not implemented (VMS, RISC OS, VOS). Available only on Windows NT (not on Windows 95). (Win32)
Not implemented. (AmigaOS, RISC OS, VM/ESA, VMS) Emulated using multiple interpreters. See 21. (Win32) Does not automatically flush output handles on some platforms. (SunOS, Solaris, HP-UX)
Not implemented. (RISC OS)
Not implemented. (Win32, VMS, RISC OS)
Not implemented. (Win32, RISC OS)
Not implemented. (Win32, VMS, RISC OS, VOS, VM/ESA)
Not implemented. (Win32) Not useful. (RISC OS)
Not implemented. (Win32, VMS, RISC OS)
Not implemented. (Win32, Plan 9)
Not implemented. (Win32) Not useful. (RISC OS)
Not implemented. (Win32, VMS, RISC OS)
Not implemented. (Win32, Plan 9)
Not implemented. (Win32, VM/ESA)
Not implemented. (Win32, VMS, VM/ESA)
gethostbyname('localhost') does not work everywhere: you may have to use gethostbyname(''). (Irix 5)
Not implemented. (Win32)
Not implemented. (Win32, Plan 9)
Not implemented. (Win32, Plan 9)
Not implemented. (Win32, Plan 9)
Not implemented. (Win32, Plan 9, RISC OS)
Not implemented. (Win32, Plan 9, RISC OS)
Not implemented. (Win32, Plan 9, RISC OS)
Not implemented. (Plan 9, Win32, RISC OS)
Not implemented. (MPE/iX, VM/ESA, Win32)
Not implemented. (MPE/iX, RISC OS, VM/ESA, VMS, Win32)
Not implemented. (Win32)
Not implemented. (Win32, Plan 9)
Not implemented. (Win32, Plan 9)
Not implemented. (Plan 9, Win32)
Not implemented. (Plan 9)
This operator is implemented via the File::Glob extension on most platforms. See File::Glob for portability information.
In theory, gmtime() is reliable from -2**63 to 2**63-1. However, because work arounds in the implementation use floating point numbers, it will become inaccurate as the time gets larger. This is a bug and will be fixed in the future.
Not implemented. (VMS) Available only for socket handles, and it does what the ioctlsocket() call in the Winsock API does. (Win32) Available only for socket handles. (RISC OS)
Not implemented, hence not useful for taint checking. (RISC OS) kill() doesn't have the semantics of raise(), i.e. it doesn't send a signal to the identified process like it does on Unix platforms. Instead kill($sig, $pid) terminates the process identified by $pid, and makes it exit immediately with exit status $sig. As in Unix, if $sig is 0 and the specified process exists, it returns true without actually terminating it. (Win32) kill(-9, $pid) will terminate the process specified by $pid and recursively all child processes owned by it. This is different from the Unix semantics, where the signal will be delivered to all processes in the same process group as the process specified by $pid. (Win32) Is not supported for process identification number of 0 or negative numbers. (VMS)
Not implemented. (MPE/iX, RISC OS) Link count not updated because hard links are not quite that hard (They are sort of half-way between hard and soft links). (AmigaOS) Hard links are implemented on Win32 under NTFS only. They are natively supported on Windows 2000 and later. On Windows NT they are implemented using the Windows POSIX subsystem support and the Perl process will need Administrator or Backup Operator privileges to create hard links. Available on 64 bit OpenVMS 8.2 and later. (VMS)
localtime() has the same range as gmtime, but because time zone rules change its accuracy for historical and future times may degrade but usually by no more than an hour.
Not implemented. (RISC OS) Return values (especially for device and inode) may be bogus. (Win32)
Not implemented. (Win32, VMS, Plan 9, RISC OS, VOS)
open to |- and -| are unsupported. (Win32, RISC OS) Opening a process does not automatically flush output handles on some platforms. (SunOS, Solaris, HP-UX)
Not implemented. (Win32, VMS, RISC OS)
Can't move directories between directories on different logical volumes. (Win32)
Only implemented on sockets. (Win32, VMS) Only reliable on sockets. (RISC OS) Note that the select FILEHANDLE form is generally portable.
Not implemented. ( Win32, VMS, RISC OS, VOS)
Not implemented. (MPE/iX, VMS, Win32, RISC OS, VOS)
Not implemented. (Win32, VMS, RISC OS, VOS)
Not implemented. (Win32, VMS, RISC OS, VOS)
Not implemented. (MPE/iX, Win32, RISC OS, VOS)
Not implemented. (Plan 9)
Not implemented. (Win32, VMS, RISC OS, VOS)
A relatively recent addition to socket functions, may not be implemented even in Unix platforms.
Not implemented. (RISC OS, VOS, VM/ESA) Available on 64 bit OpenVMS 8.2 and later. (VMS)
Platforms that do not have rdev, blksize, or blocks will return these as ”, so numeric comparison or manipulation of these fields may cause 'not numeric' warnings. ctime not supported on UFS (Mac OS X). ctime is creation time instead of inode change time (Win32). device and inode are not meaningful. (Win32) device and inode are not necessarily reliable. (VMS) mtime, atime and ctime all return the last modification time. Device and inode are not necessarily reliable. (RISC OS) dev, rdev, blksize, and blocks are not available. inode is not meaningful and will differ between stat calls on the same file. (os2) some versions of cygwin when doing a stat("foo") and if not finding it may then attempt to stat("foo.exe") (Cygwin) On Win32 stat() needs to open the file to determine the link count and update attributes that may have been changed through hard links. Setting ${^WIN32_SLOPPY_STAT} to a true value speeds up stat() by not performing this operation. (Win32)
Not implemented. (Win32, RISC OS) Implemented on 64 bit VMS 8.3. VMS requires the symbolic link to be in Unix syntax if it is intended to resolve to a valid path.
Not implemented. (Win32, VMS, RISC OS, VOS, VM/ESA)
The traditional "0", "1", and "2" MODEs are implemented with different numeric values on some systems. The flags exported by Fcntl (O_RDONLY, O_WRONLY, O_RDWR) should work everywhere though. (Mac OS, OS/390, VM/ESA)
As an optimization, may not call the command shell specified in $ENV{PERL5SHELL}. system(1, @args) spawns an external process and immediately returns its process designator, without waiting for it to terminate. Return value may be used subsequently in wait or waitpid. Failure to spawn() a subprocess is indicated by setting $? to "255 << 8". $? is set in a way compatible with Unix (i.e. the exitstatus of the subprocess is obtained by "$? >> 8", as described in the documentation). (Win32) There is no shell to process metacharacters, and the native standard is to pass a command line terminated by "\n" "\r" or "\0" to the spawned program. Redirection such as > foo is performed (if at all) by the run time library of the spawned program. system list will call the Unix emulation library's exec emulation, which attempts to provide emulation of the stdin, stdout, stderr in force in the parent, providing the child program uses a compatible version of the emulation library. scalar will call the native command line direct and no such emulation of a child Unix program will exists. Mileage will vary. (RISC OS) Does not automatically flush output handles on some platforms. (SunOS, Solaris, HP-UX) The return value is POSIX-like (shifted up by 8 bits), which only allows room for a made-up value derived from the severity bits of the native 32-bit condition code (unless overridden by use vmsish 'status'). If the native condition code is one that has a POSIX value encoded, the POSIX value will be decoded to extract the expected exit value. For more details see $? in perlvms. (VMS)
"cumulative" times will be bogus. On anything other than Windows NT or Windows 2000, "system" time will be bogus, and "user" time is actually the time returned by the clock() function in the C runtime library. (Win32) Not useful. (RISC OS)
Not implemented. (Older versions of VMS) Truncation to same-or-shorter lengths only. (VOS) If a FILEHANDLE is supplied, it must be writable and opened in append mode (i.e., use open(FH, '>>filename') or sysopen(FH,...,O_APPEND|O_RDWR). If a filename is supplied, it should not be held open elsewhere. (Win32)
Returns undef where unavailable, as of version 5.005. umask works but the correct permissions are set only when the file is finally closed. (AmigaOS)
Only the modification time is updated. (BeOS, VMS, RISC OS) May not behave as expected. Behavior depends on the C runtime library's implementation of utime(), and the filesystem being used. The FAT filesystem typically does not support an "access time" field, and it may limit timestamps to a granularity of two seconds. (Win32)
Can only be applied to process handles returned for processes spawned using system(1, ...) or pseudo processes created with fork(). (Win32) Not useful. (RISC OS)
ISBN 9781906966027Perl Language Reference ManualSee the print edition