Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have a piece of my data below
I'm using the following sort routine6 [107.108.109.110] [111.112.113.114] Get 08:35:04.3662; 29459 2 [107.108.109.110] [1.2.3.4] GetNext 08:34:02.3362; 29459 3 [107.108.109.110] [11.12.13.14] GetNext 08:34:04.3462; 29459 7 [11.12.13.14] [107.108.109.110] GetReply 08:34:04.3632; 29459 5 [1.2.3.4] [107.108.109.110] GetReply 08:34:02.3562; 29459 4 [111.112.113.114] [107.108.109.110] GetReply 08:35:04.3752; 29459
What I'm trying to do is match up the IP's (i.e)@array = sort { $a->[5] <=> $b->[5] # || $a->[3] cmp $b->[3] } @array;
Anyone have any ideas? I'm at a loss.6 [107.108.109.110] [111.112.113.114] Get 08:35:04.3662; 29459 4 [111.112.113.114] [107.108.109.110] GetReply 08:35:04.3752; 29459 2 [107.108.109.110] [1.2.3.4] GetNext 08:34:02.3362; 29459 5 [1.2.3.4] [107.108.109.110] GetReply 08:34:02.3562; 29459 3 [107.108.109.110] [11.12.13.14] GetNext 08:34:04.3462; 29459 7 [11.12.13.14] [107.108.109.110] GetReply 08:34:04.3632; 29459
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need sorting help
by hawtin (Prior) on Jan 31, 2003 at 22:53 UTC | |
|
Re: Need sorting help
by tall_man (Parson) on Feb 01, 2003 at 00:47 UTC |