Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!uhccux!munnari.oz.au!frankland-river!pem From: pem@frankland-river.aaii.oz.au (Paul E. Maisano) Newsgroups: comp.lang.perl Subject: Re: Done already (was Re: referencing scalars apart from subroutine calls) Message-ID: <1276@frankland-river.aaii.oz.au> Date: 7 Mar 90 22:29:03 GMT References: <1232@frankland-river.aaii.oz.au> <1990Mar7.055852.1192@iwarp.intel.com> Organization: Australian AI Institute Lines: 23 In article <1990Mar7.055852.1192@iwarp.intel.com>, merlyn@iwarp.intel.com (Randal Schwartz) writes: > Arrggh! grep() taken to the extreme!!! This is better supported as: > > for ($array[EXPR]) { > ... > ... > ... > } > > Same results exactly. If you assign into $_, the corresponding array > element changes (right, Larry?). Sorry, I had already tried that and it didn't work. I thought of the for loop before the grep but I think the manual says that the referencing through $_ only works for real arrays as opposed to lists. Anyway it doesn't work. It could be useful if it did work. I certainly don't see any harm in it. ------------------ Paul E. Maisano Australian Artificial Intelligence Institute 1 Grattan St. Carlton, Vic. 3053, Australia Ph: +613 663-7922 Fax: +613 663-7937 Email: pem@aaii.oz.au UUCP: {uunet,mcsun,ukc,nttlab}!munnari!aaii.oz.au!pem