increment a loop variable, even when the loop has been continued via
the C<next> statement.
+Extension modules can also hook into the Perl parser to define new
+kinds of compound statement. These are introduced by a keyword which
+the extension recognises, and the syntax following the keyword is
+defined entirely by the extension. If you are an implementor, see
+L<perlapi/PL_keyword_plugin> for the mechanism. If you are using such
+a module, see the module's documentation for details of the syntax that
+it defines.
+
=head2 Loop Control
X<loop control> X<loop, control> X<next> X<last> X<redo> X<continue>
}
print "\@array contains $count copies of 'foo'\n";
-On exit from the C<when> block, there is an implicit C<next>.
+At the end of all C<when> blocks, there is an implicit C<next>.
You can override that with an explicit C<last> if you're only
interested in the first match.
Any CodeRef scalar sub truth $b->($a)
Hash Hash hash keys identical (every key is found in both hashes)
- Array Hash hash slice existence grep { exists $b->{$_} } @$a
+ Array Hash hash keys intersection grep { exists $b->{$_} } @$a
Regex Hash hash key grep grep /$a/, keys %$b
undef Hash always false (undef can't be a key)
Any Hash hash entry existence exists $b->{$a}
- Hash Array hash slice existence grep { exists $a->{$_} } @$b
+ Hash Array hash keys intersection grep { exists $a->{$_} } @$b
Array Array arrays are comparable[2]
Regex Array array grep grep /$a/, @$b
undef Array array contains undef grep !defined, @$b