seems like you are getting too complicated and choosing the wrong operator here. Tell me why you want to use the qw operator?
in reply to Precedence of qw
from perldoc perlop
Evaluates to a list of the words extracted out of STRING, using
embedded whitespace as the word delimiters. It can be under-
stood as being roughly equivalent to:
split(’ ’, q/STRING/);
the differences being that it generates a real list at compile
time, and in scalar context it returns the last element in the
So why in the heck would you use this operator on one value in the middle of a push statement. The interpreter does its best but you are making it hemmorage here. use the q operator.
push @array, q(X) x 2;
print @array, "\n";