in reply to Fast sublist generation

You could avoid regexp using index:

if(index($key, $combine) != -1) { print "Found (prefix $combine): $1\n"; }

It should be more efficient than compiling and executing a regexp. For the suffix code you could combine index and length.