I want to perform a multi column sort using one field and then the next.

Example, lets say I have a datafile that looks like:

1|Animals|Dogs
2|Animals|Cats
3|Beach|Babes
4|Beach|Hunks
5|Sports|Football
6|Sports|Hockey
7|Advertisement|General
8||Ships
9||Cars

I want to split on the | and sort by the second column and then by the
third.

My result should come out as:

8||Ships
9||Cars
7|Advertisement|General
2|Animals|Cats
1|Animals|Dogs
3|Beach|Babes
4|Beach|Hunks
5|Sports|Football
6|Sports|Hockey

You'll notice the second column is sorted and then after that the third
is sorted.

I haven't performed this kind of sort so any help is appreciated.

Troy


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to