in reply to List::MoreUtils before, after and ... between?
I don't know if this counts as better or worse...
@list = qw<eval DBIC::3 DBIC::2 DBIC::1 MyApp::3 MyApp::2 MyApp::1 Da +ncer::3 Dancer::2 Dancer::1>; $begin = 1 + last_index { /^(DBIC|eval)/ } @list; $end = (-1) + first_index { /^Dancer/ } @list; @foo2 = @list[ $begin .. $end ]; say for @foo2;
|
|---|