ibjdt
Programmer
- Nov 25, 2002
- 63
i have a database with information from which i pull a temp file like:
i am using perl to sort and display the temp file like:
but it returns
how can i get it to sort in proper order??
does the 'c-' make a difference??
i tried <=> instead of cmp, but it didn't help.
thanks.
Code:
c-1
c-2
c-3.....
c-10
c-11....
i am using perl to sort and display the temp file like:
Code:
@doclist = sort {
(split '::', $a, 12)[0] cmp
(split '::', $b, 12)[0]
||
(split '::', $a, 12)[1] cmp
(split '::', $b, 12)[1]
} @doclist;
but it returns
Code:
c-1
c-10
c-11
c-2
c-3....
how can i get it to sort in proper order??
does the 'c-' make a difference??
i tried <=> instead of cmp, but it didn't help.
thanks.