use CGI; use List::Util qw(first); my $q = CGI->new; if (first { $_ eq 'wsdl' } $q->keywords}) { ... }