Changeset 12999 for docs/Perl6/Perl5
- Timestamp:
- 09/03/06 23:30:12 (2 years ago)
- Files:
-
- 1 modified
-
docs/Perl6/Perl5/Differences.pod (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
docs/Perl6/Perl5/Differences.pod
r12958 r12999 48 48 For details, see L<S02/"Names and Variables">. 49 49 50 =head2 Global Variables have a twigil50 =head2 Global variables have a twigil 51 51 52 52 Yes, a twigil. It's the second character in the variable name. For globals, … … 91 91 See L<S02/"double-underscore forms are going away"> for details. 92 92 93 94 93 =cut 95 94 … … 98 97 =head1 Operators 99 98 100 A comprehensive list of operator changes are documented here: 101 102 L<S03/"Changes to Perl 5 operators"> 103 L<S03/"New operators"> 99 A comprehensive list of operator changes is documented at L<S03/"Changes to 100 Perl 5 operators"> and L<S03/"New operators">. 104 101 105 102 Some highlights: 106 103 107 =head2 qw()has a customary form; new interpolating form104 =head2 C<qw()> has a customary form; new interpolating form 108 105 109 106 Was: qw(foo) … … 113 110 Now: <<foo $bar bat>> 114 111 115 Quoting operators now have modifiers that can be used with them (much 116 like regexes and substitutions in Perl 5), and you can even define 117 your own quoting operators. See S03for details.112 Quoting operators now have modifiers that can be used with them (much like 113 regexes and substitutions in Perl 5), and you can even define your own quoting 114 operators. See L<S03> for details. 118 115 119 116 =cut … … 165 162 Now: for @whatever -> $age, $sex, $location { ... } 166 163 167 ( Onlythe C<for> version does not destroy the array.)164 (Except the C<for> version does not destroy the array.) 168 165 169 166 See L<S04/"The for statement"> and L<S29/"each"> for details. … … 190 187 Now: $str ~~ m:P5:i/^\d{2,5}\s/ 191 188 192 The 'P5'modifier is there because the standard Perl6 syntax is rather189 The C<:P5> modifier is there because the standard Perl6 syntax is rather 193 190 different, and 'P5' notes a Perl5 compatibility syntax. For the full 194 191 specification, see L<S05>. See also: … … 198 195 http://dev.perl.org/perl6/doc/design/apo/A05.html 199 196 200 And the related Exegesis, w ihch explains it more detail:197 And the related Exegesis, which explains it more detail: 201 198 202 199 http://dev.perl.org/perl6/doc/design/exe/E05.html … … 310 307 L<S29/"Obsolete"> 311 308 312 =head2 references are gone / everything is a reference309 =head2 References are gone (or: everything is a reference) 313 310 314 311 C<Capture> objects fill the ecological niche of references in Perl 6. … … 339 336 =head2 say() 340 337 341 This is a version of print()that auto-appends a newline:338 This is a version of C<print> that auto-appends a newline: 342 339 343 340 Was: print "Hello, world!\n"; … … 367 364 368 365 Most (all?) built-in functions are now methods of built-in classes such 369 as String, Array, etc.366 as C<String>, C<Array>, etc. 370 367 371 368 Was: my $len = length($string);
