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

Your code:

my $target="ARGV[0]"; my @M4; @M4 = glob('M4_${target}'); print STDOUT "the files in M4 are @M4";
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

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

    Thanks a lot Anno It works !!!

    (I have just made a little mistake in the programm As virtualsue said , it is $ARGV[0] instead of ARGV[0])