Changeset 12923 for docs/Perl6/Perl5

Show
Ignore:
Timestamp:
09/01/06 10:16:20 (2 years ago)
Author:
trey
Message:

[Differences.pod]
Infinite C<loop>. :P5 regexes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • docs/Perl6/Perl5/Differences.pod

    r12922 r12923  
    174174    Now:    loop ($i=0; $i<10; $i++) { ... } 
    175175 
     176C<loop> can also be used for infinite loops: 
     177 
     178    Was:    while (1) { ... } 
     179    Now:    loop { ... } 
     180 
    176181=cut 
    177182 
     
    179184 
    180185=head1 Regexes and Rules  
     186 
     187Many many changes.  Just read S05.  But if you're in a panic and need 
     188to get something working now, you just need to know that you can use 
     189Perl 5-compatible regexes with the C<:P5> modifier.  And that 
     190modifiers come before, not after, regexes in Perl 6.  Oh, and that 
     191C<=~> has changed to C<~~>.... 
     192 
     193    Was:    $str =~ /^\d{2,5}\s/ 
     194    Now:    $str ~~ m:P5/^\d{2,5}\s/ 
    181195 
    182196=cut 
     
    360374Kirrily "Skud" Robert, <skud@cpan.org>, 
    361375Mark Stosberg 
     376Trey Harris