One of the possible way is add one or two lines of code, that will handle "empty requests"(running script with no requests), for example, when running the script with no requests set 0 to display all the database or 1 to display the $no_matches_found message.
my $default_show_mode = 0;
But dont know how to implement this, as well what do with database.txt listing.