in reply to List::MoreUtils before, after and ... between?
How about something along these lines?
shift @array while($array ~~ /DBIC/);
pop @array while ($array[$#array] ~~ /Dancer/);
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 ;)
Once (shame on you!)
Twice (shame on me!)
More often than I'd like to be
All the time
Just when answering stupid polls
Who you callin' a fool?
I refuse to vote in this ridiculous poll
Results (534 votes). Check out past polls.