while(1) { #@FILES = `ls -1 $DIRECTORY`; @FILES = glob("$DIRECTORY/*"); print "@FILES\n"; }