RE: How to sort these elements

2005-10-26 Thread Joe Discenza
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" , :        "/view/tes

Re: How to sort these elements

2005-10-26 Thread Chris Wagner
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