opendir(LOGS, "/perl/ass/")|| die "dir not found"; #Opens the folder containing the log files @logfiles = readdir(LOGS);#Puts the name of all files into an array closedir(LOGS); $currentlog = "/perl/ass/@logfiles[$hour]"; chmod (0777, $currentlog); # << shouldnt this give me permission?!?! open(CURRENTLOG, $currentlog)|| die "file not found: $!"; # << THIS IS LINE 20