Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!exodus!stef From: stef@zweig.sun (Stephane Payrard) Newsgroups: comp.lang.perl Subject: affectation to $1 Message-ID: Date: 20 Nov 90 06:05:52 GMT Sender: news@exodus.Eng.Sun.COM Organization: Sun Microsystems -- Mountain View Lines: 28 using perl level 36 on a Sun 4/110 running SunOS 4.1: I want to convert to lower case a string I have matched. I want to do it in place (in $1); I discover that I can't write to $1; Is this a bug or a known/justified feature? demonstrated by the following script. #! /usr/local/bin/perl $_='A'; m/(.*)/; $1 =~ y/A-Z/a-z/; print "I expect 'a'; I get '$1'\n"; $1='B'; print "I expect 'b'; I get '$1'\n"; thanks -- Stephane Payrard -- stef@eng.sun.com -- (415) 336 3726 SMI 2550 Garcia Avenue M/S 10-09 Mountain View CA 94043