Single quotes do not interpolate variables. See perlop about the quoting operators. You will likely want to use one the following solutions:
@M4 = glob("M4_$target"); # no need for ${...} @M4 = glob(sprintf 'M4_%s', $target); @M4 = glob('M4_' . $target); # use simple concatenation
In reply to Re: function glob('*_${var}')
by Corion
in thread function glob('*_${var}')
by steph_bow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |