Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Complex Sort - using varying numbers of parameters

by Abigail-II (Bishop)
on Jul 04, 2002 at 15:04 UTC ( #179472=note: print w/replies, xml ) Need Help??


in reply to •Re: Complex Sort - using varying numbers of parameters
in thread Complex Sort - using varying numbers of parameters

Next time, test your code. It doesn't even want to compile with 'use strict', and produces rubbish otherwise. Here's a tested version:
my @sorted = map $_->[0], sort { for (1..1000) { return @$a <=> @$b if $_ > $#$a or $_ > $#$b; $_ and return $_ for $a->[$_] <=> $b->[$_]; } } map [$_, split /\s+/], @inputdata;
BTW, what's a GSR?

Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://179472]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2021-08-03 01:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My primary motivation for participating at PerlMonks is: (Choices in context)








    Results (32 votes). Check out past polls.

    Notices?