in reply to Re: Flip-flop won't DWIM
in thread Flip-flop won't DWIM

Thanks - in the end I also decided a flip-flop wasn't really necessary and used a more pedestrian loop. This post was mainly to see if there was in fact a nice way of using a flip flop in this case; I think ??../ D/ fits the bill.

Replies are listed 'Best First'.
Re^3: Flip-flop won't DWIM
by ikegami (Patriarch) on May 22, 2009 at 15:11 UTC
    Not really
    >perl -le"for (1..2) { print for grep scalar(??../D/), ('A'..'F'); }" A B C D
      An opportunity for the seldom-used reset function to come into play:
      perl -le"for (1..2) { print for grep scalar(??../D/), ('A'..'F'); rese +t}"

      Caution: Contents may have been coded under pressure.