in reply to sort AoH buggy?
Warning: syntactical care is required when sorting the list returned from a function. If you want to sort the list returned by the function call find_records(@key), you can use:If instead you want to sort the array @key with the comparison routine find_records() then you can use:my @contact = sort { $a cmp $b } find_records @key; my @contact = sort +find_records(@key); my @contact = sort &find_records(@key); my @contact = sort(find_records(@key));my @contact = sort { find_records() } @key; my @contact = sort find_records(@key); my @contact = sort(find_records @key); my @contact = sort(find_records (@key));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sort AoH buggy?
by LanX (Saint) on Dec 09, 2021 at 16:15 UTC | |
|
Re^2: sort AoH buggy?
by LanX (Saint) on Dec 09, 2021 at 16:24 UTC | |
|
Re^2: sort AoH buggy? (deprecation candidate)
by LanX (Saint) on Dec 09, 2021 at 16:54 UTC | |
by jdporter (Paladin) on Dec 10, 2021 at 13:00 UTC | |
by LanX (Saint) on Dec 10, 2021 at 13:12 UTC | |
by hippo (Archbishop) on Dec 10, 2021 at 15:43 UTC | |
by LanX (Saint) on Dec 10, 2021 at 19:05 UTC | |
| |
by jdporter (Paladin) on Dec 10, 2021 at 13:33 UTC | |
by LanX (Saint) on Dec 10, 2021 at 15:29 UTC | |
|