Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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

by RichardK (Vicar)
on Feb 21, 2012 at 16:09 UTC ( #955342=note: print w/ replies, xml ) Need Help??


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

How about something along these lines?

shift @array while($array[0] ~~ /DBIC/); pop @array while ($array[$#array] ~~ /Dancer/);


Comment on Re: List::MoreUtils before, after and ... between?
Download Code
Replies are listed 'Best First'.
Re^2: List::MoreUtils before, after and ... between?
by Boldra (Deacon) on Feb 22, 2012 at 09:31 UTC
    I think you overlooked the first element of my sample array: 'eval'. It's worse than that, I can get an non-DBIC element in the middle of the DBIC elements.

      Well, obviously you can change the regex to match whatever you need.

      You didn't mention that about the DBICs, that's a more difficult and messy problem.

      It's probably going to be much more successful to look for what you do want, rather than what you don't, so I'd design a regex to do just that ;)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2015-07-29 09: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 (263 votes), past polls