http://qs321.pair.com?node_id=624033


in reply to Re^2: Extract the middle part of a list
in thread Extract the middle part of a list

As you say, your blocking is incorrect. Here's how to write that:

@t_arr = grep { $var3 = (split /[_.]/)[2]; $var3 > $var1 and $var3 <= $var2; } grep { !-d and $_ !~ /^\./ } readdir(EVT_DIR);
where I've added !-d to exclude directories. You might want to use -f instead to admit only regular files.

After Compline,
Zaxo