On Wed, Apr 10, 2002 at 02:48:54PM -0400, Karger, Amir wrote:
> In fact, it's not just sort:
>
> >perl -wle '@a=qw(e d c b a); for(reverse @a){s/./uc($&)/e};print @a'
> EDCBA
Egad! But:
% perl -wle '@a=qw(e d c b a); for(map $_, @a){s/./uc($&)/e};print @a'
edcba
BUT
% perl -wle '@a=qw(e d c b a); for(grep $_, @a){s/./uc($&)/e};print @a'
EDCBA
As that Halmet dude said so long ago, there /is/ something
rotten in this realm of Denmark...
> In fact:
>
> >perl -wle '@a=qw(e d c); @c=qw(b a); for(@a,@c){s/./uc($&)/e};print @a,@c'
> EDCBA
This is also a -- how can I put it mildly? -- surprise to me.
> Some more data?
No, no more. Please, no more...
> >perl -wle '%a=qw(a b c d); for(%a){s/./uc$&/e};print %a'
> abcd
yet
% perl -wle '$a="a"; for($a){s/./uc($&)/e};print $a'
A
Do we discriminate against hashes...
Words fails me.
Joy,
`/anick
--
$_ = 'Oxsgnm0qtkdr0nudq0C`fna`g+0ats0nm0S`snhmd0sgd0B`ldk0hr'
..'0jhmf-';s,(.),!$1?' ':chr(ord($1)+1),eg;print;