良し悪しはまた別に置いといて。 SQL::String - An object representation of a chunk of SQL - metacpan.org #!/usr/bin/perl use strict; use warnings; use Data::Dump qw(dump); use Perl6::Say; use SQL::String; sub ss { my ($sql, @params) = @_; SQL::String->new($sql, @params); } my ($country_min_population, $city_min_population) = (50000000, 1000000); my $sub_query = ss(q|SELECT Code FROM Country WHERE Population > ?|,