+sub cmp_tuples {
+
+ my($a, $b) = @_;
+
+ while (@$a && @$b) {
+ my $cmp = shift @$a <=> shift @$b;
+ return $cmp if $cmp;
+ }
+
+ return @$a <=> @$b;
+}
Philip, please avoid using $a and $b in any code, but sort() callbacks, as
they are special in perl and may have bad side effects.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://mailchannels.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]