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?
I love that module. Thank goodness it's in the core since 5.8. Of course that doesn't address your beef, but in this case I think you're looking for aliasing, not a condensed form of the ternary. Some of that is available with Perl5 already, had you phrased your loop differently:use List::Util qw(min); $hash{$set}{min} = min @{$hash{$set}{data}};
And in Perl6 (I'm probably getting the syntax wrong) it'd be something like:for (@{$hash{$set}{data}}) { $hash{$set}{min} = $hash{$set}{min} < $_ ? $hash{$set}{min} : $_; }
my $min := $hash{$set}{min}; for(@{%hash{$set}{data}}) { $min = $min < $_ ? $min : $_ }
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^3: A set of new operators. In keeping with the design of Perl? (aliasing)
by BrowserUk (Patriarch) on May 21, 2003 at 16:10 UTC | |
by Aristotle (Chancellor) on May 21, 2003 at 20:58 UTC |