Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!ruuinf!piet From: piet@cs.ruu.nl (Piet van Oostrum) Newsgroups: comp.lang.perl Subject: Re: Multi-line strings and $* Message-ID: <4203@ruuinf.cs.ruu.nl> Date: 6 Nov 90 14:18:30 GMT References: <1391@tharr.UUCP> Sender: news@ruuinf.cs.ruu.nl Reply-To: piet@cs.ruu.nl (Piet van Oostrum) Organization: Dept of Computer Science, Utrecht University, The Netherlands Lines: 19 In-reply-to: gustav@tharr.UUCP (Paul Moore) >>>>> In message <1391@tharr.UUCP>, gustav@tharr.UUCP (Paul Moore) (PM) writes: PM> My first thought is $article =~ s/\n+$//, with $* = 0. But the manual says PM> "Pattern matches on strings containing multiple newlines can produce PM> confusing results when $* is 0". Um. Larry will probably also comment on this, but in patch 19 it is stated that from now on `$' will only match at string end (or at the newline just before the end) when $*==0. So s/\n+$// works. Actually the only confusion that remains is whether the LAST newline will be substituted. Maybe Larry can give the rules. Unfortunately, the manual ``page'' has not been updated with the patch. -- Piet* van Oostrum, Dept of Computer Science, Utrecht University, Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands. Telephone: +31 30 531806 Uucp: uunet!mcsun!ruuinf!piet Telefax: +31 30 513791 Internet: piet@cs.ruu.nl (*`Pete')