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