The name has significance only for the current script. File pointer is at the beginning of the file. A for append Opens an existing file.
File pointer is at the end of the file.
W for write. Creates a new file or truncates an existing file of the same name. File pointer is at the beginning of the file. It is possible to read from a file opened in 'W' or 'A' mode and it is possible to write to a file opened in 'R' mode. Writing to an existing file with the pointer located at its beginning will overwrite existing data.