in reply to opendir or not?

There's nothing inherently wrong with the glob approach you're using with the <> operator. The POD does warn against variable interpolation within a <> operator for readability reasons (perlop section on the < > operator):

If you're trying to do variable interpolation, it's definitely better to use the glob() function, because the older notation can cause people to become confused with the indirect filehandle notation.

@files = glob("$dir/*.[ch]"); @files = glob($files[$i]);

Seems like a pretty minor nit. It sounds like you're fine.


Dave