Title: How to sort these elements
Maxmelbin Neson (RBIN/EDM3) wrote, on Wed 26-Oct-05
06:50[snipped]
:
"/view/test.max2kor1/vobs/maxvob/satish.c@@/main/tmp_maxtest1/12"
:
"/view/test.max2kor1/vobs/maxvob/max.c@@/main/tmp_maxtest1/7" ,
:
U'll need a two stage sort. Once to get the dirs in ascii order and then
again on each group to get the numeric sort. Read perldoc -f sort.
foreach $i (@list) {
($dir, $file) = $i =~ m/^(.+)\/(.+)$/;
push @{$hash{$dir}}, $file;
}
foreach $key (sort %hash) {
@j = sort {$a
Title: How to sort these elements
Hello ,
Contents of my array is as follows
@a= ("/view/test.max2kor1/vobs/maxvob/satish.c@@/main/tmp_maxtest1/1" ,
"/view/test.max2kor1/vobs/maxvob/satish.c@@/main/tmp_maxtest1/4" ,
"/view/test.max2kor1/vo