Single quotes ('...') don't interpolate variables, double quotes ("...") do. You need double quotes in the third line of your code. Also, it is possible (and preferred) to declare a variable when it is first used. Replace the second and third line in your code with
my @M4 = glob "M4_$target";
Anno
In reply to Re: function glob('*_${var}')
by Anno
in thread function glob('*_${var}')
by steph_bow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |