use Regex::PreSuf; doSomething() if $data =~ presuf(@vals);