Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!hellgate.utah.edu!cs.utexas.edu!wuarchive!rex!ames!haven!uvaarpa!mmdf From: martin%easby.durham.ac.uk@pucc.PRINCETON.EDU (Martin Ward) Newsgroups: comp.lang.perl Subject: Re: sh: foo=$bar-baz; perl: ($foo = $bar) =^ s/$/baz/; Message-ID: <1990Aug1.095116.15915@uvaarpa.Virginia.EDU> Date: 1 Aug 90 09:51:16 GMT Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System) Reply-To: martin%easby.durham.ac.uk@pucc.PRINCETON.EDU Organization: The Internet Lines: 15 | Anything better? Remember, the variables could have looooooooong names | you rather wouldn't retype. How about: $foo = $bar ? $bar : $baz; I didn't retype (honest) - but perhaps Maarten doesn't have an editor which can select and copy? I am sure Randal will write one for him in perl... but can he fit it into one line? :-) :-) Martin. My ARPANET address is: martin%EASBY.DUR.AC.UK@CUNYVM.CUNY.EDU OR: martin%uk.ac.dur.easby@nfsnet-relay.ac.uk UUCP:...!mcvax!ukc!easby!martin JANET: martin@uk.ac.dur.easby BITNET: IN%"MARTIN@EASBY.DURHAM.AC.UK"