in reply to function glob('*_${var}')

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

Replies are listed 'Best First'.
Re^2: function glob('*_${var}')
by steph_bow (Pilgrim) on Jul 13, 2007 at 09:00 UTC

    Thanks a lot Corion.

    You are very nice.