Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!casbah.acns.nwu.edu!ftpbox!motsrd!motcid!mostek From: mostek@motcid.UUCP (Frank B. Mostek) Newsgroups: comp.lang.perl Subject: file append/read (+>>) Summary: file open append and read Keywords: file open append and read Message-ID: <6086@beryl12.UUCP> Date: 27 Mar 91 20:04:37 GMT Distribution: comp Organization: Motorola Inc., Cellular Infrastructure Div., Arlington Heights, IL Lines: 25 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"); while () { # Never gets in here } I've tried patch level 18 (3.0) and patch level 44. Is this a bug or am I doing something wrong? I am on: SunOS Release 4.0.3 (SDW403.STD3X.V1.1) #1: Sun Nov 12 19:52:18 CST 1989 Also, is there a way to grep a file within perl? Perl's grep needs a list, I currently use system("grep...") which is much slower. I just need to know if an expression occurs in a file. Is there an elegant way to do this using Perl's constructs? Thanx in advance -- ************************************************************ Frank Mostek uunet!motcid!amethyst!mostek Software Consultant (708)632-7191 ************************************************************