kamielslets
Technical User
Hello,
I'm looking for a variant of the solution in faq219-6545 "How do i sort columns/fields of mixed data?".
I my specific case i only need to sort one (of multiple) columns and take in the column number as a command line argument, such that i can choose which one to sort. Now, most
columns have plain numerical values (<=> operator can be used), but others have numerical values including a physical unit. Example: 6.2u or 500K or 3n. Is there a way to first interprete these units, convert them to something Perl understands and then start sorting them taking these orders of magnitude into consideration?
Thanks a lot!
I'm looking for a variant of the solution in faq219-6545 "How do i sort columns/fields of mixed data?".
I my specific case i only need to sort one (of multiple) columns and take in the column number as a command line argument, such that i can choose which one to sort. Now, most
columns have plain numerical values (<=> operator can be used), but others have numerical values including a physical unit. Example: 6.2u or 500K or 3n. Is there a way to first interprete these units, convert them to something Perl understands and then start sorting them taking these orders of magnitude into consideration?
Thanks a lot!