>  TC>     ($foo += 3) *= 2;

>that is way too many assignment ops. better is the normalized

>       $foo = ($foo + 3) * 2;

>  TC>     $n = select($rout=$rin, $wout=$win, $eout=$ein, 2.5);

>who uses select directly anymore? use a module! :)

I see the smiley, but one must be exceedingly careful not to enshrine
one's own personal preferences and predilections--one's own small
choices of style and nuance--into laws inviolate, and then to further
go on to hold others accountable for not having followed those
choices that one has made for oneself and then dicated to others.

There's plenty that is convenient--to to mention familiar, reasonable,
and perhaps even idiomatically comforting--about about changing en
passant via assignment's lvaluability:

    ($this = $that) =~ s/foo/bar/;

or for a whole bunch of them:

    for (@these = @those) { s/foo/bar/ } 

You can't really do those in one step without it.

I have in passing proposed a form of s/// that acts upon a temporary
not the original and returns the new value not the success status.
This would employ the previously unused binary ~ operator (I mean
binary as in two operands; the unary ~ is bitwise, but I don't mean
that kind of binary.)  Were this around, one could write that first
one as

    $this = $that ~ s/foo/bar/:

Because the right side of the assignment is the string resulting
from that substitute, without harming $that.

By extension, the array case could be

    @these = map { $_ ~ s/foo/bar/ } @those

Which is still not very appealing, actually.  Hm... 

--tom

Reply via email to