R
Radek G.
Hello
I must implemend sorting in perl (that's not too dificult
) but...i must
sort some array with grouping (like in sql).
I meen... For Example I have array with first and last names:
@names= ('a a','a b','a c',' b b', 'b d' ). And i must sort it first by
first name from 'z' to 'a' and by last name from 'a' to 'z'.
so after sorting i recive something like:
@names=
b b
b d
a a
a b
a c
Anyone have some beautyfull "one line" code to do it (sort , map, grep).
Regards Radek
I must implemend sorting in perl (that's not too dificult
sort some array with grouping (like in sql).
I meen... For Example I have array with first and last names:
@names= ('a a','a b','a c',' b b', 'b d' ). And i must sort it first by
first name from 'z' to 'a' and by last name from 'a' to 'z'.
so after sorting i recive something like:
@names=
b b
b d
a a
a b
a c
Anyone have some beautyfull "one line" code to do it (sort , map, grep).
Regards Radek