@M4 = glob("M4_$target"); # no need for ${...} @M4 = glob(sprintf 'M4_%s', $target); @M4 = glob('M4_' . $target); # use simple concatenation