X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfunc.pod;h=db90b86879c33faf931691ea0e06b949f66c1b3a;hb=91331b4fc62e0ad9094741aa6359fb89e2fc5554;hp=0235c37fed428bf9de2badb5be496e6afcb84c4d;hpb=fe58ced666d4d8b2252541f18d23bdd3e127c8f9;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 0235c37..db90b86 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -612,6 +612,8 @@ If VARIABLE is omitted, it chomps C<$_>. Example: # ... } +If VARIABLE is a hash, it chomps the hash's values, but not its keys. + You can actually chomp anything that's an lvalue, including an assignment: chomp($cwd = `pwd`); @@ -638,6 +640,8 @@ Example: #... } +If VARIABLE is a hash, it chops the hash's values, but not its keys. + You can actually chop anything that's an lvalue, including an assignment: chop($cwd = `pwd`); @@ -2819,7 +2823,7 @@ otherwise it's necessary to protect any leading and trailing whitespace: $file =~ s#^(\s)#./$1#; open(FOO, "< $file\0"); -(this may not work on some bizzare filesystems). One should +(this may not work on some bizarre filesystems). One should conscientiously choose between the I and 3-arguments form of open(): @@ -4101,7 +4105,7 @@ C interface to access setitimer(2) if your system supports it, or else see L above. The Time::HiRes module from CPAN may also help. -See also the POSIX module's C function. +See also the POSIX module's C function. =item socket SOCKET,DOMAIN,TYPE,PROTOCOL @@ -5087,6 +5091,7 @@ A class implementing a hash should have the following methods: FIRSTKEY this NEXTKEY this, lastkey DESTROY this + UNTIE this A class implementing an ordinary array should have the following methods: @@ -5103,6 +5108,7 @@ A class implementing an ordinary array should have the following methods: SPLICE this, offset, length, LIST EXTEND this, count DESTROY this + UNTIE this A class implementing a file handle should have the following methods: @@ -5113,8 +5119,15 @@ A class implementing a file handle should have the following methods: WRITE this, scalar, length, offset PRINT this, LIST PRINTF this, format, LIST + BINMODE this + EOF this + FILENO this + SEEK this, position, whence + TELL this + OPEN this, mode, LIST CLOSE this DESTROY this + UNTIE this A class implementing a scalar should have the following methods: @@ -5122,6 +5135,7 @@ A class implementing a scalar should have the following methods: FETCH this, STORE this, value DESTROY this + UNTIE this Not all methods indicated above need be implemented. See L, L, L, L, and L. @@ -5482,7 +5496,7 @@ If BITS is 8, "elements" coincide with bytes of the input string. If BITS is 16 or more, bytes of the input string are grouped into chunks of size BITS/8, and each group is converted to a number as with -pack()/unpack() with big-endian formats C/C (and analoguously +pack()/unpack() with big-endian formats C/C (and analogously for BITS==64). See L<"pack"> for details. If bits is 4 or less, the string is broken into bytes, then the bits @@ -5502,6 +5516,14 @@ If an element off the end of the string is written to, Perl will first extend the string with sufficiently many zero bytes. It is an error to try to write off the beginning of the string (i.e. negative OFFSET). +The string should not contain any character with the value > 255 (which +can only happen if you're using UTF8 encoding). If it does, it will be +treated as something which is not UTF8 encoded. When the C was +assigned to, other parts of your program will also no longer consider the +string to be UTF8 encoded. In other words, if you do have such characters +in your string, vec() will operate on the actual byte string, and not the +conceptual character string. + Strings created with C can also be manipulated with the logical operators C<|>, C<&>, C<^>, and C<~>. These operators will assume a bit vector operation is desired when both operands are strings.