while (<*>) { do_stuff_to $_; } or better opendir DH,"."; @dir=readdir DH; closedir DH; foreach (@dir) { Do_your_thing $_; }