Penguin

Differences between current version and predecessor to the previous major change of perlre(1).

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 2 Last edited on Tuesday, June 4, 2002 12:22:38 am by perry
Older page: version 1 Last edited on Tuesday, June 4, 2002 12:22:38 am by perry Revert
@@ -225,24 +225,24 @@
 backslash character classes (if available), will 
 hold: 
  
  
- alpha IsAlpha  
-alnum IsAlnum 
+ alpha ! IsAlpha  
+alnum ! IsAlnum 
 ascii IsASCII 
-blank IsSpace  
-cntrl IsCntrl  
-digit IsDigit d  
-graph IsGraph  
-lower IsLower  
-print IsPrint  
-punct IsPunct  
-space IsSpace  
-IsSpacePerl s  
-upper IsUpper  
-word IsWord 
+blank ! IsSpace  
+cntrl ! IsCntrl  
+digit ! IsDigit d  
+graph ! IsGraph  
+lower ! IsLower  
+print ! IsPrint  
+punct ! IsPunct  
+space ! IsSpace  
+! IsSpacePerl s  
+upper ! IsUpper  
+word ! IsWord 
 xdigit IsXDigit 
-For example [[:lower:] and p{IsLower} are equivalent. 
+For example [[:lower:] and p{! IsLower} are equivalent. 
  
  
 If the utf8 pragma is not used but the 
 locale pragma is, the classes correlate with the 
@@ -298,11 +298,11 @@
 example: 
  
  
  POSIX trad. Perl utf8 Perl 
- [[:^digit:] D P{IsDigit}  
-[[:^space:] S P{IsSpace}  
-[[:^word:] W P{IsWord} 
+ [[:^digit:] D P{! IsDigit}  
+[[:^space:] S P{! IsSpace}  
+[[:^word:] W P{! IsWord} 
 The POSIX character classes [[.cc.] and [[=cc=] are recognized but __not__ supported and trying to use them will cause an error. 
  
  
 Perl defines the following zero-width 
@@ -1006,9 +1006,9 @@
 like: 
  
  
  $pattern =~ s/(W)/\1/g; 
-This is grandfathered for the RHS of a substitute to avoid shocking the __sed__ addicts, but it's a dirty habit to get into. That's because in PerlThink, the righthand side of a s/// is a double-quoted string. 1 in the usual double-quoted string means a control-A. The customary Unix meaning of 1 is kludged in for s///. However, if you get into the habit of doing that, you get yourself into trouble if you then add an /e modifier. 
+This is grandfathered for the RHS of a substitute to avoid shocking the __sed__ addicts, but it's a dirty habit to get into. That's because in ! PerlThink, the righthand side of a s/// is a double-quoted string. 1 in the usual double-quoted string means a control-A. The customary Unix meaning of 1 is kludged in for s///. However, if you get into the habit of doing that, you get yourself into trouble if you then add an /e modifier. 
  
  
  s/(d+)/ 1 + 1 /eg; # causes warning under -w 
 Or if you try to do 
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.