Path: utzoo!utgpu!cunews!cognos!alanm From: alanm@cognos.UUCP (Alan Myrvold) Newsgroups: comp.lang.perl Subject: Problem with $foo =~ tr/b//d; ? Message-ID: <9371@cognos.UUCP> Date: 22 Feb 91 20:43:18 GMT Reply-To: alanm@cognos.UUCP (Alan Myrvold) Organization: Cognos Inc., Ottawa, Canada Lines: 40 When I try the following : $foo = "aaabbbccc"; $foo =~ tr/b//d; print $foo,"\n"; I get : aaabbbccc while I expect : aaaccc --- and yet, $_ = "aaabbbccc"; tr/b//d; print $_,"\n"; does "the right thing". --- perl -v produces : This is perl, version 3.0 $Header: perly.c,v 3.0.1.10 91/01/11 18:22:48 lwall Locked $ Patch level: 44 Copyright (c) 1989, 1990, Larry Wall Perl may be copied only under the terms of the GNU General Public License, a copy of which can be found with the Perl 3.0 distribution kit. --- SunOS Release 4.1, if it matters. --- Alan Myrvold 3755 Riverside Dr. uunet!mitel!cunews!cognos!alanm Cognos Incorporated P.O. Box 9707 alanm%cognos.uucp@ccs.carleton.ca (613) 738-1440 x5530 Ottawa, Ontario CANADA K1G 3Z4