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:<
You will want to chmod the file like this.
chmod 0755, $filename;
#or
chmod 0755, $fh;
Alternatively, if you use sysopen and set the umask appropriately, you can do without chmod.
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.