in reply to Sort by Email Address

I'd probably just solve it like this:
my @sorted_email = map /([^\0]*)\z/, sort map { my @domain = split /\./, (/.*\@(.*)/s)[0]; join "\0", reverse(@domain), $_; } @incoming_email;
Untested, but it ran fine in my head. {grin}

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re^2: Sort by Email Address
by Aristotle (Chancellor) on Aug 20, 2002 at 11:32 UTC
    my @sorted_email = map { join "", reverse split /\0/ } sort map { join "\0", reverse /(\A[^@]+\@|\G[^.]+(?:\.|\z))/g } @email;
    TMTOWTDI :-)

    Makeshifts last the longest.

Re: Re: Sort by Email Address
by BigLug (Chaplain) on Aug 20, 2002 at 05:59 UTC
    OK, you win.
    Sulk
    Grin