chr

chr NUMBER chr Returns the character represented by that NUMBER in the character set. For example, chr(65) is "A" in either ASCII or Unicode, and chr(0x263a) is a Unicode smiley face. Negative values give the Unicode replacement character (chr(0xfffd)), except under the bytes pragma, where the low eight bits of the value (truncated to an integer) are used. If NUMBER is omitted, uses $_ . For the reverse, use ord. Note that characters from 128 to 255 (inclusive) are by default internally not enc

chown

chown LIST Changes the owner (and group) of a list of files. The first two elements of the list must be the numeric uid and gid, in that order. A value of -1 in either position is interpreted by most systems to leave that value unchanged. Returns the number of files successfully changed. $cnt = chown $uid, $gid, 'foo', 'bar'; chown $uid, $gid, @filenames; On systems that support fchown(2), you may pass filehandles among the files. On systems that don't support fchown(2), passing filehandles ra

chop

chop VARIABLE chop( LIST ) chop Chops off the last character of a string and returns the character chopped. It is much more efficient than s/.$//s because it neither scans nor copies the string. If VARIABLE is omitted, chops $_ . If VARIABLE is a hash, it chops the hash's values, but not its keys, resetting the each iterator in the process. You can actually chop anything that's an lvalue, including an assignment. If you chop a list, each element is chopped. Only the value of the last chop is re

chomp

chomp VARIABLE chomp( LIST ) chomp This safer version of chop removes any trailing string that corresponds to the current value of $/ (also known as $INPUT_RECORD_SEPARATOR in the English module). It returns the total number of characters removed from all its arguments. It's often used to remove the newline from the end of an input record when you're worried that the final record may be missing its newline. When in paragraph mode ($/ = '' ), it removes all trailing newlines from the string. Whe

chmod

chmod LIST Changes the permissions of a list of files. The first element of the list must be the numeric mode, which should probably be an octal number, and which definitely should not be a string of octal digits: 0644 is okay, but "0644" is not. Returns the number of files successfully changed. See also oct if all you have is a string. $cnt = chmod 0755, "foo", "bar"; chmod 0755, @executables; $mode = "0644"; chmod $mode, "foo"; # !!! sets mode to

CHECK

CHECK These compile phase keywords are documented in BEGIN, UNITCHECK, CHECK, INIT and END in perlmod.

chdir

chdir EXPR chdir FILEHANDLE chdir DIRHANDLE chdir Changes the working directory to EXPR, if possible. If EXPR is omitted, changes to the directory specified by $ENV{HOME} , if set; if not, changes to the directory specified by $ENV{LOGDIR} . (Under VMS, the variable $ENV{SYS$LOGIN} is also checked, and used if it is set.) If neither is set, chdir does nothing. It returns true on success, false otherwise. See the example under die. On systems that support fchdir(2), you may pass a filehandle or

charnames - access to Unicode character names and named character sequences; also define character names

NAME SYNOPSIS DESCRIPTION LOOSE MATCHES ALIASES CUSTOM ALIASES charnames::string_vianame(_name_) charnames::vianame(_name_) charnames::viacode(_code_) CUSTOM TRANSLATORS BUGS NAME charnames - access to Unicode character names and named character sequences; also define character names SYNOPSIS use charnames ':full'; print "\N{GREEK SMALL LETTER SIGMA} is called sigma.\n"; print "\N{LATIN CAPITAL LETTER E WITH VERTICAL LINE BELOW}", " is an officially named sequence of two Unicode charact

Carp - alternative warn and die for modules

NAME SYNOPSIS DESCRIPTIONForcing a Stack Trace Stack Trace formatting GLOBAL VARIABLES$Carp::MaxEvalLen $Carp::MaxArgLen $Carp::MaxArgNums $Carp::Verbose $Carp::RefArgFormatter @CARP_NOT %Carp::Internal %Carp::CarpInternal $Carp::CarpLevel BUGS SEE ALSO AUTHOR COPYRIGHT LICENSE NAME Carp - alternative warn and die for modules SYNOPSIS use Carp; # warn user (from perspective of caller) carp "string trimmed to 80 chars"; # die of errors (from perspective of caller) croak "We're outta here

caller

caller EXPR caller Returns the context of the current pure perl subroutine call. In scalar context, returns the caller's package name if there is a caller (that is, if we're in a subroutine or eval or require) and the undefined value otherwise. caller never returns XS subs and they are skipped. The next pure perl sub will appear instead of the XS sub in caller's return values. In list context, caller returns # 0 1 2 ($package, $filename, $line) = caller; With EXPR, it returns