opendir(DIRECTORY, '.') or die "Can't open current directory."; print join (', ', readdir(DIRECTORY)); closedir DIRECTORY;