system

system LIST system PROGRAM LIST Does exactly the same thing as exec LIST , except that a fork is done first and the parent process waits for the child process to exit. Note that argument processing varies depending on the number of arguments. If there is more than one argument in LIST, or if LIST is an array with more than one value, starts the program given by the first element of the list with arguments given by the rest of the list. If there is only one scalar argument, the argument is check

sysopen

sysopen FILEHANDLE,FILENAME,MODE sysopen FILEHANDLE,FILENAME,MODE,PERMS Opens the file whose filename is given by FILENAME, and associates it with FILEHANDLE. If FILEHANDLE is an expression, its value is used as the real filehandle wanted; an undefined scalar will be suitably autovivified. This function calls the underlying operating system's open(2) function with the parameters FILENAME, MODE, and PERMS. The possible values and flag bits of the MODE parameter are system-dependent; they are ava

sysread

sysread FILEHANDLE,SCALAR,LENGTH,OFFSET sysread FILEHANDLE,SCALAR,LENGTH Attempts to read LENGTH bytes of data into variable SCALAR from the specified FILEHANDLE, using the read(2). It bypasses buffered IO, so mixing this with other kinds of reads, print, write, seek, tell, or eof can cause confusion because the perlio or stdio layers usually buffers data. Returns the number of bytes actually read, 0 at end of file, or undef if there was an error (in the latter case $! is also set). SCALAR will

sysseek

sysseek FILEHANDLE,POSITION,WHENCE Sets FILEHANDLE's system position in bytes using lseek(2). FILEHANDLE may be an expression whose value gives the name of the filehandle. The values for WHENCE are 0 to set the new position to POSITION; 1 to set the it to the current position plus POSITION; and 2 to set it to EOF plus POSITION, typically negative. Note the in bytes: even if the filehandle has been set to operate on characters (for example by using the :encoding(utf8) I/O layer), tell() will ret

syscall

syscall NUMBER, LIST Calls the system call specified as the first element of the list, passing the remaining elements as arguments to the system call. If unimplemented, raises an exception. The arguments are interpreted as follows: if a given argument is numeric, the argument is passed as an int. If not, the pointer to the string value is passed. You are responsible to make sure a string is pre-extended long enough to receive any result that might be written into a string. You can't use a strin

Sys::Syslog - Perl interface to the UNIX syslog(3) calls

NAME VERSION SYNOPSIS DESCRIPTION EXPORTS FUNCTIONS THE RULES OF SYS::SYSLOG EXAMPLES CONSTANTSFacilities Levels DIAGNOSTICS HISTORY SEE ALSOOther modules Manual Pages RFCs Articles Event Log AUTHORS & ACKNOWLEDGEMENTS BUGS SUPPORT COPYRIGHT LICENSE NAME Sys::Syslog - Perl interface to the UNIX syslog(3) calls VERSION This is the documentation of version 0.33 SYNOPSIS use Sys::Syslog; # all except setlogsock() use Sys::Syslog qw(:standard :macros); # standard f

Sys::Hostname - Try every conceivable way to get hostname

NAME SYNOPSIS DESCRIPTION AUTHOR NAME Sys::Hostname - Try every conceivable way to get hostname SYNOPSIS use Sys::Hostname; $host = hostname; DESCRIPTION Attempts several methods of getting the system hostname and then caches the result. It tries the first available of the C library's gethostname(), `$Config{aphostname}` , uname(2), syscall(SYS_gethostname), `hostname` , `uname -n` , and the file /com/host. If all that fails it croak s. All NULs, returns, and newlines are removed from the re

symlink

symlink OLDFILE,NEWFILE Creates a new filename symbolically linked to the old filename. Returns 1 for success, 0 otherwise. On systems that don't support symbolic links, raises an exception. To check for that, use eval: $symlink_exists = eval { symlink("",""); 1 }; Portability issues: symlink in perlport.

Symbol - manipulate Perl symbols and their names

NAME SYNOPSIS DESCRIPTION BUGS NAME Symbol - manipulate Perl symbols and their names SYNOPSIS use Symbol; $sym = gensym; open($sym, "filename"); $_ = <$sym>; # etc. ungensym $sym; # no effect # replace *FOO{IO} handle but not $FOO, %FOO, etc. *FOO = geniosym; print qualify("x"), "\n"; # "main::x" print qualify("x", "FOO"), "\n"; # "FOO::x" print qualify("BAR::x"), "\n"; # "BAR::x" print qualify("BAR::x", "FOO"), "\n"; # "BAR::x" print qualify("STDOUT

substr

substr EXPR,OFFSET,LENGTH,REPLACEMENT substr EXPR,OFFSET,LENGTH substr EXPR,OFFSET Extracts a substring out of EXPR and returns it. First character is at offset zero. If OFFSET is negative, starts that far back from the end of the string. If LENGTH is omitted, returns everything through the end of the string. If LENGTH is negative, leaves that many characters off the end of the string. my $s = "The black cat climbed the green tree"; my $color = substr $s, 4, 5; # black my $middle = substr