Following up from here: Perl Imgsize not working in loop? I have another question - how do I not let perl list the single and double dot entries when it reads the files in a dir
If you're getting the directory contents in list context, you can use grep to filter out the dotfiles:
grep
opendir (my $dh, $src) || die "Can't opendir $src: $!\n"; my @entries = grep {!/^\./} readdir($dh); closedir ($dh);