foreach my $file(@toInstall){ print "Copying $file to $input{'installDir'}/..."; system("cp -Rf ./source/$file $input{'installDir'}/"); if(!(-e "$input{'installDir'}/$file")){ die "FAILED! Unable to complete file copy! DNE: $input{'installDir'}/$file\n"; } print "done. Attempting to set permissions: "; print(chmod(0777,"$input{'installDir'}/$file")); print "\nFinished installing $file!\n"; }