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.