in reply to Split question...

You might take it further too, depending on what you allow to search for. If you index (or raw search) on everything this doesn't matter, but many searches index on wordlike items. If you're doing that, something like this might be good:

...split /[^-\w']+/, $search_keys, 2;

So you only search for numbers and text (more or less). But that will slurp up extra stuff on the end, possibly corrupting the second element returned.

Maybe something like this?

my @keepers; for my $q ( split /[^-\w']+/, $search_keys ) { push @keepers, $q; last if @keepers == 2; }

The one thing you can count on with UI is that the U will not I as you expect him/her to.