my $sql = <<__END_SQL__; SELECT DISTINCT name FROM master WHERE name LIKE ? ORDER BY name __END_SQL__ # stuff here $sth->execute("%${company}%"); # more stuff here