!/^\./ and $cnt++ for readdir( DIR ); #### $cnt = grep !/^\./, readdir DIR;