in reply to Re: flip-flop operator and sequence number
in thread flip-flop operator and sequence number
Cool... And how about this one?
foreach (sub {pop;shift;@_}->(grep /start/../stop/, @data) ) { ... }
Sorry, just kidding :-)
UPDATE: taking Abigail and John M. Dlugosz's remarks into account, the original post wanted to stop after the first occurence of 'stop'. I guess we should then be using ?? instead of // to prevent matching more than once.
foreach (sub {pop;shift;@_}->(grep ?start?..?stop?, @data) ) { ... }
--bwana147
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: flip-flop operator and sequence number
by Abigail (Deacon) on Jun 28, 2001 at 19:38 UTC | |
by John M. Dlugosz (Monsignor) on Jun 28, 2001 at 19:48 UTC | |
|
Re: Re: Re: flip-flop operator and sequence number
by John M. Dlugosz (Monsignor) on Jun 28, 2001 at 19:26 UTC | |
by bwana147 (Pilgrim) on Jun 28, 2001 at 19:51 UTC | |
by John M. Dlugosz (Monsignor) on Jun 28, 2001 at 20:10 UTC |