[svn:perl6-synopsis] r12136 - doc/trunk/design/syn
Author: larry Date: Sat Sep 16 17:35:31 2006 New Revision: 12136 Modified: doc/trunk/design/syn/S03.pod Log: Documented differences to filetest ops. Modified: doc/trunk/design/syn/S03.pod == --- doc/trunk/design/syn/S03.pod(original) +++ doc/trunk/design/syn/S03.podSat Sep 16 17:35:31 2006 @@ -12,9 +12,9 @@ Maintainer: Larry Wall <[EMAIL PROTECTED]> Date: 8 Mar 2004 - Last Modified: 14 Sep 2006 + Last Modified: 16 Sep 2006 Number: 3 - Version: 64 + Version: 65 =head1 Changes to Perl 5 operators @@ -35,6 +35,19 @@ "stitching" the two ends of its arguments together. String append is likewise C<~=>. +=item * The filetest operators now return a result that is both a boolean +and a stat buffer, so there is no longer any need for Perl 5's C<_> term. +Instead just cascade tests to "and" them: + +if -r -w -x $filename {...} + +Or put the value in a variable to do anything fancier: + +$sb = -e $filename; +if -r $sb {...} +if -w $sb {...} +if -x $sb {...} + =item * All postfix operators that do not start with a dot also have an alternate form that does. (The converse does not hold--just because you can write C doesn't mean you can write C. Likewise
[svn:perl6-synopsis] r12149 - doc/trunk/design/syn
Author: larry Date: Sat Sep 16 21:54:12 2006 New Revision: 12149 Modified: doc/trunk/design/syn/S03.pod Log: clarification of -s from TreyHarris++ Modified: doc/trunk/design/syn/S03.pod == --- doc/trunk/design/syn/S03.pod(original) +++ doc/trunk/design/syn/S03.podSat Sep 16 21:54:12 2006 @@ -14,7 +14,7 @@ Date: 8 Mar 2004 Last Modified: 16 Sep 2006 Number: 3 - Version: 65 + Version: 66 =head1 Changes to Perl 5 operators @@ -35,9 +35,10 @@ "stitching" the two ends of its arguments together. String append is likewise C<~=>. -=item * The filetest operators now return a result that is both a boolean -and a stat buffer, so there is no longer any need for Perl 5's C<_> term. -Instead just cascade tests to "and" them: +=item * The filetest operators now return a result that is both a +boolean (or in the case of C<-s>, a number) and a stat buffer, so +there is no longer any need for Perl 5's C<_> term. Instead just +cascade tests to "and" them: if -r -w -x $filename {...}