opendir DIR, $dir; my @file = grep {/^*.ORD_API_log$/} readdir DIR; closedir DIR; #### {/^*.ORD_API_log$/: regexp *+ operand could be empty at ....