On Wed, 16 Feb 2005 14:29:14 -0600, Rod Adams <[EMAIL PROTECTED]> wrote: > Larry Wall wrote: > > >That, and we'd like a novice to be able to write > > > > given $x { > > when 1 | 2 | 3 {...} > > when 4 | 5 | 6 {...} > > } > > > Or just change C<when> to accept a list of things to compare against, > followed by a coderef.
Well, I don't think anyone can argue that having ~~ behave properly with junctions is wrong. After all, we can make it do whatever we want. $foo ~~ 1 | 2 | 3 Perhaps we can make ~~ an even more magical comparison operator. $x ~~ $y is a huffmanized version of $x ~==~ $y @x ~<~ $y is a smart-match based on < instead of == Or perhaps you can choose on which side the magic works: @x ~< $y OK, enough craziness for today. $foo ~<~ $bar # uses C<lt> for strings, C<+<>for numbers, voodoo for junctions, etc... Ashley