I\'m writing a Perl script that generates a Bash script. I\'m using open() with a mode of > to output everything to a new file. Standard stuff:<
open()
>
Putting + infront of < or > allows you to open the file in both read and write mode.
+
<
In you case you can chmod the newly created file.