Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by BrowserUk (Pope)
on Feb 21, 2012 at 14:55 UTC ( #955325=note: print w/ replies, xml ) Need Help??


in reply to List::MoreUtils before, after and ... between?

Your specific example is more simply accomplished with grep:

@foo = grep /MyApp/, qw<eval DBIC::3 DBIC::2 DBIC::1 MyApp::3 MyApp::2 + MyApp::1 Dancer::3 Dancer::2 Dancer::1>;; print for @foo;; MyApp::3 MyApp::2 MyApp::1

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


Comment on Re: List::MoreUtils before, after and ... between?
Download Code
Re^2: List::MoreUtils before, after and ... between?
by rovf (Priest) on Feb 21, 2012 at 15:16 UTC

    This assumes that it is *known* that we search for "MyApp". I understood the problem in the following way: Throw away everything in the beginning of the list up to, and including, DBIC. Then keep everythin which follows, up to (but not including) the first Dancer. Then throw away what follows. For instance, a MyApp which precedes a DBIC or follows a Dancer, should also be thrown away. This can't be done with your grep solution.

    -- 
    Ronald Fischer <ynnor@mm.st>
      Your specific example...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-12-26 00:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls