| Prev | Perl Notes |
Next |
you may want to save some output from a script to an external file.
To write to a file:
|
open(FILE, ">>../myfile.txt") || &ErrorMessage; print FILE "I'm adding text to a file.\n"; close(FILE); sub ErrorMessage { print "Could not open file. It either does not exist or the permissions are wrong\n"; exit; } |
| Prev | Home | Next |