Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mcnc!uvaarpa!mmdf From: marc@athena.mit.edu Newsgroups: comp.lang.perl Subject: // operator in an array context. Message-ID: <1990Jul27.233637.10921@uvaarpa.Virginia.EDU> Date: 27 Jul 90 23:36:37 GMT Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System) Reply-To: marc@mit.edu Organization: The Internet Lines: 25 For the following, assume $_ = "foo bar"; If I do: /(\S*)\s*/; then $1 will be "foo" and $' will be "bar". If I do ($a) = /(\S*)\s*/; then $a will be "foo", but $1 and $' will be unset. I guess $1 being unset makes a little sense (although I can't see why it shouldn't be), but I still want $'. I couldn't find anything in the man page (I couldn't decide what to search for :-) which indicated that assignment to $' (and $` and $&, I imaging) did not work when the // expression was evaluated in an array context like this. Is it a perl bug, a doc bug, or did I miss something? Marc P.S. I think this is the slowest way to do japh I've seen yet. Something my twisted mind thought up really early in the morning. perl -e '@_=(172191,161194349,266797,83211665);foreach(@_){$w="A".("a"x(log($_)/log(26)));for($i=0;$i<$_;$i++){$w++;}print$w," ";}print"\n";'