in reply to Re: Re: A set of new operators. In keeping with the design of Perl?
in thread A set of new operators. In keeping with the design of Perl?

for ( 0 .. $#{ $hash{$set}{data} } ) { $hash{$set}{min} = $hash{$set}{min} < $hash{$set}{data}[$_] ? $hash{$set}{min} : $hash{$set}{data}[$_]; }

I personally find the above solution easier to read. However, since this is in a loop, and regular ? : evaluates the data twice, your proposed operator could be considerably faster in some cases. Naturally, the premature optimization alarms are ringing here, so I'm going to stop typing now (:

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

Note: All code is untested, unless otherwise stated