Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: A "strange" behaviour, at least to me :)

by ikegami (Pope)
on Apr 13, 2013 at 17:36 UTC ( #1028540=note: print w/replies, xml ) Need Help??


in reply to Re: A "strange" behaviour, at least to me :)
in thread A "strange" behaviour, at least to me :)

@values = sort {},arraynosort(Values=>\@orig_values);
passes a hash ref to sort. You meant
@values = sort { $a cmp $b } arraynosort(Values=>\@orig_values);

By the way, the least invasive solution is:

@values = sort +arraynosort(Values=>\@orig_values);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1028540]
help
Chatterbox?
[marto]: Beware the one liner :p
[Discipulus]: no, they are my crossword/sudoku like entertainment
Discipulus grins
[marto]: Even with shell command recall I find it less time consuming to do such things in a file.

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2017-09-22 08:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (260 votes). Check out past polls.

    Notices?