Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^2: Flip-flop won't DWIM

by wu-lee (Beadle)
on May 22, 2009 at 11:05 UTC ( #765659=note: print w/replies, xml ) Need Help??

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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://765659]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2023-10-03 14:56 GMT
Find Nodes?
    Voting Booth?

    No recent polls found