|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Hello,
I am having a small problem with sorting the following: @Rows $Rows [0][0] = ref0 $Rows [0][1] = title0 $Rows [0][2] = desc0 $Rows [1][0] = ref1 $Rows [1][1] = title1 $Rows [1][2] = desc1 $Rows [2][0] = ref2 $Rows [2][1] = title2 $Rows [2][2] = desc2 @sorted = sort {$Rows{$a->[0][1]} <=> $Rows{$b->[0][1]}} @Rows; Any advice/help/rewrites would be appreciated. ![]() -Loki |
|
#2
|
|||
|
|||
|
You should go to -> http://www.perl.com/CPAN-local/modules/by-module/Sort/ and download Sort-Fields-0.90.tar.gz
Fields.pm is a must-use perl module for every perl coders. If you don't have root access to install it, simply upload Fields.pm to "Sort" directory and specify the following lines to your script like so: use lib '/path/to/parent/directory/of/Sort'; use Sort::Fields; |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Sorting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|