my $dir = '.'; opendir(my $dh, $dir) or die "Could not open $dir because $!\n; @list = readdir($dh); closedir($dh);