in reply to grep & take part of match

Putting the extensions in another array (but kinda ugly):
my @exts; my @eFILES = grep { /^env\.([a-z]{3})$/; push @exts, $1 if $1 && ($_ ne 'env.fix') && -f "$LIBDIR/$_" } readdir(LDIR);

Note that your 1st regex is not needed ((!/^\./)) because you are also checking for env at the start of the string.

Updated to make a little more readable.