foreach (sub {pop;shift;@_}->(grep /start/../stop/, @data) ) { ... } #### foreach (sub {pop;shift;@_}->(grep ?start?..?stop?, @data) ) { ... }