On Fri, 27 Aug 2004, Luke Palmer wrote:
> > $downcaserule = 'A-Z' => 'a-z';
> > $l33trule = 'EISTA' => '31574';
> > $str =~ tr( { $l33trule, $downcaserule } );
> >
> > may or may not do what the naive reader expects, and randomly so!
[snip]
> or not. the point is that it's only undefined for certain
> implementations, and if we're smart, we'll use an implementation for
> which it is not undefined.
Well, there is already a Perl5 modules that implements hashes preserving
the order of the keys. So there will likely be one in Perl6 too, but I
wonder wether there could be a builtin trait for this instead, with the
obvious caveat that it will yield a less efficient implementation. I mean
something like
my %hash is ordered;
Michele
--
> Math, astrophysics, and quantum mechanics used to be fun. Time to
> move on... maybe a long hike in the woods.
Maybe now you've sorted that out, you could go on to solve the problems of
abnormal psychology. There are still many unresolved issues there.
- "Dave" in sci.math,sci.astro, "Re: Math is no longer fun"