Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: List::MoreUtils before, after and ... between?

by Boldra (Deacon)
on Feb 22, 2012 at 10:36 UTC ( #955492=note: print w/ replies, xml ) Need Help??


in reply to Re^3: List::MoreUtils before, after and ... between?
in thread List::MoreUtils before, after and ... between?

That looks very readable and produces the output I said I need, but not for some of the edge cases that other monks thought of:

say for grep { /DBIC/ .. /Dancer/ and !/DBIC/ and !/Dancer/ } qw<eval +DBIC::3 eval DBIC::2 DBIC::1 MyApp::3 MyApp::2 MyApp::1 Dancer::3 Dan +cer::2 Dancer::1>;
and
say for grep { /DBIC/ .. /Dancer/ and !/DBIC/ and !/Dancer/ } qw<MyApp +::3 MyApp::2 MyApp::1 Dancer::3 Dancer::2 Dancer::1>;
I hadn't thought of these edge cases when I posted, but the first one is a distinct possibility. The example code with reverse before works ok for these.

Thanks for showing me a new way of using the flip-flop.



- Boldra


Comment on Re^4: List::MoreUtils before, after and ... between?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2015-07-29 16:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (265 votes), past polls