Skip navigation.
Home
Your source for Perl tips, howto's, faq and tutorials
( categories: )

- Open a file for reading:

open(FH, "<filename");

- Open a file for writing (truncating the file if it exists):

open(FH, ">filename");

- Open a file for writing in appending mode:

open(FH, ">>filename");

- Open a file for reading and writing:

open(FH, "+<filename");