The results of my foreach loop looks like

<[EMAIL PROTECTED]><[EMAIL PROTECTED]>
<[EMAIL PROTECTED]><[EMAIL PROTECTED]>
<[EMAIL PROTECTED]><[EMAIL PROTECTED]>
<john@anothercompany><[EMAIL PROTECTED]>
<[EMAIL PROTECTED]><[EMAIL PROTECTED]>
<[EMAIL PROTECTED]><[EMAIL PROTECTED]>
<john@anothercompany><[EMAIL PROTECTED]>

and I want to eliminate the duplicates and sort the results to  

<[EMAIL PROTECTED]><[EMAIL PROTECTED]>
<john@anothercompany><[EMAIL PROTECTED]>
<[EMAIL PROTECTED]><[EMAIL PROTECTED]>

Thanks
David



> -----Original Message-----
> From: Wagner-David [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 04, 2001 1:56 PM
> To: 'David Stavert'; [EMAIL PROTECTED]
> Subject: RE: Sorting
> 
> 
>       Uncertain where you want to go:
> 
>       To get a sorted set from a hash, then do:
>         foreach my $MyId (sort keys %recipient)
>            # now sorted by recipient
>          }
> 
>       Is this what you are after?
> 
> Wags ;)
> -----Original Message-----
> From: David Stavert [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, November 04, 2001 11:30
> To: [EMAIL PROTECTED]
> Subject: Sorting
> 
> 
> I am trying to create a script that runs through a maillog file that
> collects the to and from addresses for a domain and then 
> sorts out all the
> unique from addresses to a to address.
> 
> I am using a foreach loop " foreach $i ( keys %recipient ) "
> which gives me a list of from addresses to each recipient. 
> The script gives
> me what I want except a sorted unique list. I have tried sort 
> within the
> foreach loop but it doesn't sort. Where should I be headed?
> 
> David Stavert
> Netraprise Systems, Inc.
> 79 13th Ave NE
> Suite 112
> Minneapolis, MN 55413
> 612.317.9065
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to