in reply to opendir, readir into @array in one line?
my @array = glob("$dir/*"); [download]
my @array = <$dir/*>; [download]