opendir(DIR, "./Data"); while( $name = readdir(DIR) ) { next if $name !~ /^\d*.html/; push(@files, $name); } close(DIR);