in reply to Re: Re: Re: Re: sort mechanism
in thread sort mechanism
#!/usr/local/bin/perl -l my @a = (1, 2, 3); my @b = (1, 2, 4); my @c = ( "equal", "a > b", "b > a" ); print ($c[@a<=>@b]); print ($c[@b<=>@a]); print ($c[(1, 2, 3)<=>(1, 2, 4)]); print ($c[(1, 2, 4)<=>(1, 2, 3)]);
Produces:
equal equal b > a a > bSomething about the difference between an array and a list, I suspect - a distinction oft unclear in my mind, regardless of caffine levels.
Peace,
-McD
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Something Strange is Afoot Here
by extremely (Priest) on Apr 07, 2001 at 00:52 UTC |