On Tue, Feb 11, 2003 at 11:12:28AM -0500, darren chamberlain wrote:
> * Stephen Reppucci <sgr at logsoft.com> [2003-02-11 11:00]:
> > Except for one thing: you'll want to swap those first two statements
> > in the for loop -- otherwise you'll end up escaping your regex '.'s
> > that replaced the wildcard '*'s...
>
> Damn. I did that in my test code, too, but pasted the wrong one in.
> Good catch.
Something like this,
my @local_parts = sort { ($a eq '*' ? 2 : $a =~ /\*/ ? 1 : 0)
<=>
($b eq '*' ? 2 : $b =~ /\*/ ? 1 : 0) }
# your source
That puts '*' last, something with * next, and anything else first.
Add map qr/^$_$/ to taste.
P
--
Paul Makepeace ....................................... http://paulm.com/
"If (x == 1), then that must make me a goddess."
-- http://paulm.com/toys/surrealism/
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm