Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!ogicse!schaefer From: schaefer@ogicse.ogi.edu (Barton E. Schaefer) Newsgroups: comp.lang.perl Subject: Re: Novice Question: How is -e supposed to work? Message-ID: <11451@ogicse.ogi.edu> Date: 17 Aug 90 03:41:57 GMT References: <1990Aug16.070010.26529@morrow.stanford.edu> <11415@ogicse.ogi.edu> <1990Aug16.172303.12982@morrow.stanford.edu> Organization: Oregon Graduate Institute (formerly OGC), Beaverton, OR Lines: 17 In article <1990Aug16.172303.12982@morrow.stanford.edu> whenry@lindy.stanford.edu (homo obsolescensis) writes: } In article <> schaefer@ogicse.ogi.edu (Barton E. Schaefer) writes: } > perl -pi.bak -e 's/foo/bar/;' < bas } } This does indeed work as far as -e is concerned (s/foo/bar is done) } but not as far as -i (or, more likely I dont understand -i). shouldnt } your fragment result in bas being overwritten with the changed text? No, because I also made a typo. Get rid of that < character. If it doesn't work when you use perl -pi.bak -e 's/foo/bar/;' bas then something funny is going on. -- Bart Schaefer schaefer@cse.ogi.edu