in reply to File check w/no files

Probably all you need is to test @files in a separate if() statement.

BTW, i fyou use glob(), there's no need for opendir().

    -- Chip Salzenberg, Free-Floating Agent of Chaos