Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Forgot to mention * as the right arg of flipflop.
$a ff * (or any of the other flipflop ops) means that there is no stop
condition. Once $a matches, the flipflop is always successful.
  • Loading branch information
ShimmerFairy committed Aug 8, 2015
1 parent 64b148b commit aa0d2ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Language/operators.pod
Expand Up @@ -1163,6 +1163,13 @@ the first element is printed:
say $_ if /A/ ff /B/; # prints only "AB"
}
If you only want to test against a start condition, and have no stop condition,
C<*> can be used as the "stop" condition.
for <A B C D E> {
say $_ if /C/ ff *; # prints C, D, and E
}
For the sed-like version, which does I<not> try C<$_> on the stop condition
after succeeding on the start condition, see L<C<fff>>.
Expand Down

0 comments on commit aa0d2ea

Please sign in to comment.