marc@athena.mit.edu (07/28/90)
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";'