quote qqw

Documentation for quote qqw, assembled from the following types:

language documentation Quoting Constructs

From Quoting Constructs

(Quoting Constructs) quote qqw

The qw form of word quoting doesn't interpolate variables:

my $a = 42say qw{$a b c};  # OUTPUT: «$a b c␤» 

Thus, if you wish for variables to be interpolated within the quoted string, you need to use the qqw variant:

my $a = 42;
my @list = qqw{$a b c};
say @list;                # OUTPUT: «[42 b c]␤» 

Note that variable interpolation happens before word splitting:

my $a = "a b";
my @list = qqw{$a c};
.say for @list# OUTPUT: «a␤b␤c␤»