# open a file for reading in the current directory open(FILEHANDLE,"< some_file"); # open a file for reading using the full path (always a good idea) open(FILEHANDLE,"< /home/my_user/some_file"); # open a file for writing open(FILEHANDLE,"> /home/my_user/some_file"); # append to the end of a file open(FILEHANDLE,">> /home/my_user/some_file"); # and it's always a good idea to check for failures ($! contains the error message) open(FILEHANDLE,"< /home/my_user/some_file") || die "Can't read file: $!"; # be polite and close the file when you're done :) close(FILEHANDLE);