Path: utzoo!utgpu!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: Perl bug (was: Capitalizing words in a line.) Message-ID: <4861@ruuinf.cs.ruu.nl> Date: 15 Feb 91 09:51:52 GMT References: 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: 23 In-reply-to: marvit@hplpm.hpl.hp.com (Peter Marvit) >>>>> In message , marvit@hplpm.hpl.hp.com (Peter Marvit) (PM) writes: PM> My own thanks to the fellow who needed to UPPERCASE certain key words in PM> a file. It's a problem I just needed a solution for. However... PM> I tried doing a s|\w.|tr[a-z][A-Z]| and some variants, but nothing worked PM> correctly. I plead to the perl community for help. I thought the following might be a good try: $_ = "this is a test case OF UPPERCASE\n"; s|\b(.)|$1=~tr/a-z/A-Z/|e; print $_ However, perl dumps core (segmentation fault) on this. Looks like a bug to me (or otherwise I should get an errormessage) -- 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')