http://www.perlmonks.org?node_id=1007909


in reply to Problem in displaying files

you can also try this logic :
while($file = readdir($dh)) { next if $file eq '.'; next if $file eq '..'; }