in reply to Re: Re3: Anyone use "xor" in conditionals?
in thread Anyone use "xor" in conditionals?
++ BrowserUK for thinking like i do. :) how about this little gem from Net::Netmask...
sort_by_ip_address This function is included in "Net::Netmask"
simply because there doesn't seem to be a bet-
ter place to put it on CPAN. It turns out
that there is one method for sorting dotted-
quads ("a.b.c.d") that is faster than all the
rest. This is that way. Use it as
"sort_by_ip_address(@list_of_ips)".
sub sort_by_ip_address { return sort { pack("C4",split(/\./,$a)) cmp pack("C4",split(/\./,$ +b)) } @_ }
which has to be about the worst possible.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re6: Anyone use "xor" in conditionals?
by dragonchild (Archbishop) on Jul 15, 2003 at 13:49 UTC | |
by zengargoyle (Deacon) on Jul 15, 2003 at 20:32 UTC | |
by tye (Sage) on Jul 15, 2003 at 20:59 UTC | |
by zengargoyle (Deacon) on Jul 16, 2003 at 00:22 UTC | |
by RMGir (Prior) on Feb 27, 2004 at 12:40 UTC | |
by dragonchild (Archbishop) on Jul 15, 2003 at 20:36 UTC |