Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!sun-barr!ccut!wnoc-tyo-news!sranha!anprda!akira From: akira@atson.asahi-np.co.jp (Akira Takiguchi) Newsgroups: comp.lang.perl Subject: Re: file append/read (+>>) Keywords: file open append and read Message-ID: <1266@anprda.atson.asahi-np.co.jp> Date: 29 Mar 91 10:09:50 GMT References: <6086@beryl12.UUCP> <126616@uunet.UU.NET> Reply-To: akira@anprda.atson.asahi-np.co.jp (Akira Takiguchi) Distribution: comp Organization: ATSON, Inc. Lines: 17 In article <126616@uunet.UU.NET> rbj@uunet.UU.NET (Root Boy Jim) writes: >In article <6086@beryl12.UUCP> mostek@motcid.UUCP (Frank B. Mostek) writes: >?I can't get the + operator to work when I open a file for append. This >?is supposed to open the file for read as well. >? >?open(FILE, "+>>file"); : >When opening for append, the pointer is at the end. >There is nothing left to read. Seek to the beginning. A bit of addition: perl's open uses stdio interface, not open(2). you know, fopen(3) behaves differently from open(2) when reading file opened in append mode [VAXC open does not implement this behaviour, BTW]. -- | Akira Takiguchi at ATSON, Inc. (a subsidiary of the Asahi Shimbun) | WAKO GINZA bldg. 8-10-4 Ginza Chuo-ku Tokyo 104 Japan | Phone +81 3 3289 7051 Fax +81 3 3289 7066 SORRY, EMAIL NOT AVAILABLE