I didn't know that if the right hand (reset) expression doesn't match, flip-flop to keep it's state, like closure.
How about putting sentinel to the list, which surely reset flip-flop state?
not elegant? I like flip-flop since Marshall introduced me at Parsing a file and finding the dependencies in itsub blah3 { my($look_for, @array)=@_; my @elements_we_want = grep { $_ eq $look_for .. $_ eq 'MY SENTINEL'} @array,'MY SENTINEL +'; return @elements_we_want[ 1 .. $#elements_we_want -1]; }
In reply to Re: flip-flop flop
by remiah
in thread flip-flop flop
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |