in reply to RegEx within glob
would work. If you want something more sophisticated than that, you need grep. regex can be used in a grep, but not a glob().my @EnvListFile=glob("$HOMEDIR/data/EnvList.*");
moritz's answer is fine also.open DIR, "$HOMEDIR/data/EnvList" or die $!; my @EnvListFile = grep{ -f "$HOMEDIR/data/EnvList/$_" and /\d+$/ } readdir DIR; #perhaps???
|
|---|