File handling in Perl is clean and flexible. You can open files for reading, writing, or appending using the open
function with modes.
Use <
mode to open a file for reading.
Use >
mode to write (overwrites the file).
Use >>
mode to append to the end of a file.
close()
filehandles after you're done to free system resources.