LiTinOveWeedle has asked for the wisdom of the Perl Monks concerning the following question:
Hi brothers,
I need sort @array in which is each element line of csv file - so values are separated by delimiter.like value1;value2;value3;value4 etc. And I need sort @array by certain valueX. But before comparing with <=> I must convert values to be numeric only. I know (it's given) that in value2 are only (in whole @array) number in this format xx.xxx.xxx,xx so I must use regex to remove points and replace comma by point. (but globaly I have many types of data fields, so script must be able to determine which regex use depending of given data type) But after sorting I want get as results not values changed by regex but sorted original values.....
I tested sort with mapbut I fail to get this to work :-(
ply if you know solution get me know..... THX to all
Li Tin O've Weedle
mad Tsort's philosopher
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sorting with Schwartzian Transform
by no_slogan (Deacon) on May 08, 2001 at 03:08 UTC | |
|
Re: sorting with Schwartzian Transform
by LiTinOveWeedle (Scribe) on May 08, 2001 at 03:15 UTC | |
by no_slogan (Deacon) on May 08, 2001 at 03:32 UTC | |
by LiTinOveWeedle (Scribe) on May 08, 2001 at 03:41 UTC |